|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectInput extends the DataInput interface to include the reading of objects. DataInput includes methods for the input of primitive types, ObjectInput extends that interface to include objects, arrays, and Strings.
InputStream
,
ObjectOutputStream
,
ObjectInputStream
Method Summary | |
int |
available()
Returns the number of bytes that can be read without blocking. |
void |
close()
Closes the input stream. |
int |
read()
Reads a byte of data. |
int |
read(byte[] b)
Reads into an array of bytes. |
int |
read(byte[] b,
int off,
int len)
Reads into an array of bytes. |
Object |
readObject()
Read and return an object. |
long |
skip(long n)
Skips n bytes of input. |
Methods inherited from interface java.io.DataInput |
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes |
Method Detail |
public Object readObject() throws ClassNotFoundException, IOException
ClassNotFoundException
- If the class of a serialized
object cannot be found.IOException
- If any of the usual Input/Output
related exceptions occur.public int read() throws IOException
IOException
- If an I/O error has occurred.public int read(byte[] b) throws IOException
b
- the buffer into which the data is readIOException
- If an I/O error has occurred.public int read(byte[] b, int off, int len) throws IOException
b
- the buffer into which the data is readoff
- the start offset of the datalen
- the maximum number of bytes readIOException
- If an I/O error has occurred.public long skip(long n) throws IOException
n
- the number of bytes to be skippedIOException
- If an I/O error has occurred.public int available() throws IOException
IOException
- If an I/O error has occurred.public void close() throws IOException
IOException
- If an I/O error has occurred.
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.