java.io.ObjectInputStream (class) |
Constructors: |
ObjectInputStream(InputStream o);
|
General Description: |
Using this class you read transmitted or stored objects. You create this object with an InputStream (available in the Socket class). |
Parent Class: |
InputStream |
Methods |
int available(); |
Return the number of bytes you can read without blocking. |
void close(); |
Close this channel. |
void defaultReadObject(); |
Read the current class' non-static and non-transient fields from this stream. |
int read(); |
|
int read(byte[] arr, int offset, int len); |
|
readFully(byte[] arr); |
|
readFully(byte[] arr, int offset, int len); |
Read a byte or an array of bytes beginning at offset for len bytes. readFully() reads all the bytes to fill the array, blocking as needed. |
boolean readboolean(); |
|
byte readByte(); |
|
char readChar(); |
|
double readDouble(); |
|
float readFloat(); |
|
int readInt(); |
|
long readLong(); |
|
short readShort(); |
|
int readUnsignedByte(); |
|
int readUnsignedShort(); |
|
String readUTF(); |
Read the designated type. |
Object readObject(); |
Read Object instance. You can discover the type and then convert it later with the casting operators. |
Exceptions Thrown |
IOException, ClassNotFoundException, NotActiveException, OptionalDataException, InvalidObjectException, SecurityException, StreamCorruptedException, |