Public class ObjectInputStream extends InputStream implements ObjectInput, ObjectStreamConstants
Constructor | Description |
---|---|
Protected ObjectInputStream() | The function of this constructor is to create the object input stream instance for reimplemetation. |
ObjectInputStream(InputStream in) | The function of this constructor is to create the object input stream instance and used to read from input stream. |
Method | Description |
---|---|
int read () | By using this method it reads the bytes of data from the input stream. |
void read fully( byte[] buf) | The function of this method is to read the bytes from the input stream and store in array buffer. |
int skipBytes(int n) | From the input stream this method skips over and throw out ‘n’ bytes of data. |
int read(byte[] buf, int off, int n) | By using this method it reads the data up to 'n' bytes from the input stream to an array of the bytes. |
String readUTF() | The function of this method is to read the content in the string format and have encoded by UTF-8 format. |
Object readObject() | The function of this method is to read the object from input stream |