Reading process:

    InputStream in= ... ; // any output stream
    ObjectInputStream objIn= new ObjectInputStream(in);
    int j= objIn.readInt();
    Object space= objIn.readObject();
    ...
Inconvenience: must catch exceptions IOException, OptionalDataException and ClassNotFoundException.


- 6 -