Class como.io.ObjectInputStream
All Packages Class Hierarchy This Package Previous Next Index
Class como.io.ObjectInputStream
java.lang.Object
|
+----java.io.InputStream
|
+----java.io.FilterInputStream
|
+----java.io.DataInputStream
|
+----como.io.ObjectInputStream
- public class ObjectInputStream
- extends DataInputStream
An ObjectInputStream is used to write Objects to a Stream.
It can load every Object that implements Saveable and
which was saved with the ObjectOutputStream!
You can even recursively load/save Objects. I.e. an object
may call writeObject( my_object ) in it's save()-method!
-
ObjectInputStream(InputStream)
-
-
readObject()
- Reads an Object from the ObjectInputStream.
-
readString()
- Reads a String from the ObjectInputStream.
ObjectInputStream
public ObjectInputStream(InputStream in)
readString
public String readString() throws IOException
- Reads a String from the ObjectInputStream. You don't have
to draw attention to the length. It will be automatically
correct!
- Returns:
- the String that was loaded
readObject
public Object readObject() throws IOException
- Reads an Object from the ObjectInputStream. It reads
every Object that implements Saveable. And some other
basic Classes like Hashtable, Integer, byte[], int[],
Boolean, Point, Dimension.
- Returns:
- the Object that was loaded
All Packages Class Hierarchy This Package Previous Next Index