|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ObjectInput
Streams to be used with serialization to read objects must implement this interface. ObjectInputStream is one example.
ObjectInputStream,
ObjectOutput| Method Summary | |
|---|---|
int |
available()
Returns a int representing then number of bytes of primitive data that are available. |
void |
close()
Close this ObjectInput. |
int |
read()
Reads a single byte from this ObjectInput and returns the result as an int. |
int |
read(byte[] buffer)
Reads bytes from the ObjectInput and stores them in byte
array buffer. |
int |
read(byte[] buffer,
int offset,
int count)
Reads at most count bytes from the ObjectInput and stores
them in byte array buffer starting at offset
count. |
Object |
readObject()
Reads the next object from this ObjectInput. |
long |
skip(long toSkip)
Skips toSkip number of bytes in this ObjectInput. |
| Methods inherited from interface java.io.DataInput |
|---|
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes |
| Method Detail |
|---|
int available()
throws IOException
IOException - If an error occurs in this ObjectInput.
void close()
throws IOException
IOException - If an error occurs attempting to close this ObjectInput.
int read()
throws IOException
IOException - If the ObjectInput is already closed or another IOException
occurs.
int read(byte[] buffer)
throws IOException
ObjectInput and stores them in byte
array buffer. Blocks while waiting for input.
buffer - the array in which to store the read bytes.
-1 if encountered end
of ObjectInput.
IOException - If the ObjectInput is already closed or
another IOException occurs.
int read(byte[] buffer,
int offset,
int count)
throws IOException
count bytes from the ObjectInput and stores
them in byte array buffer starting at offset
count. Answer the number of bytes actually read or -1 if
no bytes were read and end of ObjectInput was encountered.
buffer - the byte array in which to store the read bytes.offset - the offset in buffer to store the read bytes.count - the maximum number of bytes to store in buffer.
IOException - If the ObjectInput is already closed or another IOException
occurs.
Object readObject()
throws ClassNotFoundException,
IOException
IOException - If an error occurs attempting to read from this ObjectInput.
ClassNotFoundException - If the object's class cannot be found
long skip(long toSkip)
throws IOException
toSkip number of bytes in this ObjectInput.
Subsequent read()'s will not return these bytes.
toSkip - the number of bytes to skip.
IOException - If the ObjectInput is already closed or another IOException
occurs.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||