java.io.ObjectInputStream (JDK 1.1)
ObjectInputStream is used to deserialize objects, arrays, and other values from a stream that was previously created with an ObjectOutputStream. The readObject() method deserializes objects and arrays (which should then be cast to the appropriate type); various other methods are used to read primitive data values from the stream. Note that only objects that implement the Serializable interface or the Externalizable interface can be serialized and deserialized.
The defaultReadObject() method may only be called from the readObject() method of an object that is currently being deserialized. It allows an object to perform additional processing after deserializing itself. The registerValidation() method may also only be called from the readObject() method of an object being deserialized. It registers an ObjectInputValidation object (typically the object being deserialized) to be notified when a complete tree of objects has been deserialized and the original call to the readObject() method of the ObjectInputStream is about to return to its caller.
The remaining methods include miscellaneous stream manipulation methods and several protected methods for use by subclasses that want to customize the deserialization behavior of ObjectInputStream.
public classObjectInputStreamextends InputStream implements ObjectInput { //Public ConstructorpublicObjectInputStream(InputStreamin) throws IOException, StreamCorruptedException; //Public Instance Methodspublic intavailable() throws IOException; //Overrides InputStreampublic voidclose() throws IOException; //Overrides InputStreampublic final voiddefaultReadObject() throws IOException, ClassNotFoundException, NotActiveException; public intread() throws IOException; //Defines InputStreampublic intread(byte[]data, intoffset, intlength) throws IOException; //Overrides InputStreampublic booleanreadBoolean() throws IOException; //From DataInputpublic bytereadByte() throws IOException; //From DataInputpublic charreadChar() throws IOException; //From DataInputpublic doublereadDouble() throws IOException; //From DataInputpublic floatreadFloat() throws IOException; //From DataInputpublic voidreadFully(byte[]data) throws IOException; //From DataInputpublic voidreadFully(byte[]data, intoffset, intsize) throws IOException; //From DataInputpublic intreadInt() throws IOException; //From DataInputpublic StringreadLine() throws IOException; //From DataInputpublic longreadLong() throws IOException; //From DataInputpublic final ObjectreadObject() throws OptionalDataException, public final ObjectreadObject() 'u'ClassNotFoundException, IOException; //From ObjectInputpublic shortreadShort() throws IOException; //From DataInputpublic StringreadUTF() throws IOException; //From DataInputpublic intreadUnsignedByte() throws IOException; //From DataInputpublic intreadUnsignedShort() throws IOException; //From DataInputpublic synchronized voidregisterValidation(ObjectInputValidationobj, intprio) public synchronized voidregisterValidation'u'throws NotActiveException, InvalidObjectException; public intskipBytes(intlen) throws IOException; //From DataInput//Protected Instance Methodsprotected final booleanenableResolveObject(booleanenable) throws SecurityException; protected voidreadStreamHeader() throws IOException, StreamCorruptedException; protected ClassresolveClass(ObjectStreamClassv) throws IOException, ClassNotFoundException; protected ObjectresolveObject(Objectobj) throws IOException; }
Hierarchy:
Object->InputStream->ObjectInputStream(ObjectInput(DataInput))