Name

ObjectInput

Synopsis

This interface extends the DataInput interface and adds methods for deserializing objects and reading bytes and arrays of bytes.

java.io.ObjectInput

Figure 9-35. java.io.ObjectInput

public interface ObjectInput extends DataInput {
// Public Instance Methods
     int available( ) throws IOException;  
     void close( ) throws IOException;  
     int read( ) throws IOException;  
     int read(byte[ ] b) throws IOException;  
     int read(byte[ ] b, int off, int len) throws IOException;  
     Object readObject( ) throws ClassNotFoundException, IOException;  
     long skip(long n) throws IOException;  
}

Implementations

ObjectInputStream

Passed To

Externalizable.readExternal( )

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.