public class WrapperObjectInputStream extends WrapperDataInputStream implements ObjectInput
| Constructor and Description |
|---|
WrapperObjectInputStream(ObjectInput in)
Construct a WrapperObjectInputStream that will read from the specified object implementing the ObjectInput interface.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns the number of bytes that can be read (or skipped over) from this input stream without causing a blocking I/O condition to occur.
|
void |
close()
Close the InputStream and release any system resources associated with it.
|
ObjectInput |
getObjectInput()
Obtain the underlying object providing the ObjectInput interface that this object is delegating to.
|
int |
read()
Read the next byte of data from the InputStream.
|
int |
read(byte[] ab)
Read some number of bytes from the input stream and store them into the passed array
ab. |
int |
read(byte[] ab, int of, int cb)
Read up to
cb bytes from the input stream and store them into the passed array ab starting at offset of. |
Object |
readObject()
Read and return an object.
|
long |
skip(long cb)
Skips over up to the specified number of bytes of data from this InputStream.
|
getClassLoader, getDataInput, mark, markSupported, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, reset, skipBytesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytespublic WrapperObjectInputStream(ObjectInput in)
in - an object implementing ObjectInput to read frompublic ObjectInput getObjectInput()
public Object readObject() throws ClassNotFoundException, IOException
readObject in interface ObjectInputClassNotFoundException - if the class of a serialized object object cannot be foundIOException - if an I/O error occurs
public int read()
throws IOException
int in the range 0 to 255. If the end of the stream has been reached, the value -1 is returned.
This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
read in interface com.oracle.common.io.InputStreamingread in interface ObjectInputread in class WrapperDataInputStream-1 if the end of the stream has been reachedIOException - if an I/O error occurs
public int read(byte[] ab)
throws IOException
ab. The number of bytes actually read is returned.
This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
read in interface com.oracle.common.io.InputStreamingread in interface ObjectInputread in class WrapperDataInputStreamab - the array to store the bytes which are read from the stream-1 if no bytes were read from the stream because the end of the stream had been reachedNullPointerException - if the passed array is nullIOException - if an I/O error occurs
public int read(byte[] ab,
int of,
int cb)
throws IOException
cb bytes from the input stream and store them into the passed array ab starting at offset of. The number of bytes actually read is returned.
This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
read in interface com.oracle.common.io.InputStreamingread in interface ObjectInputread in class WrapperDataInputStreamab - the array to store the bytes which are read from the streamof - the offset into the array that the read bytes will be storedcb - the maximum number of bytes to read-1 if no bytes were read from the stream because the end of the stream had been reachedNullPointerException - if the passed array is nullIndexOutOfBoundsException - if of or cb is negative, or of+cb is greater than the length of the abIOException - if an I/O error occurs
public long skip(long cb)
throws IOException
skip in interface com.oracle.common.io.InputStreamingskip in interface ObjectInputskip in class WrapperDataInputStreamcb - the maximum number of bytes to skip overIOException - if an I/O error occurs
public int available()
throws IOException
available in interface com.oracle.common.io.InputStreamingavailable in interface ObjectInputavailable in class WrapperDataInputStreamIOException - if an I/O error occurs
public void close()
throws IOException
close in interface com.oracle.common.io.InputStreamingclose in interface Closeableclose in interface ObjectInputclose in interface AutoCloseableclose in class WrapperDataInputStreamIOException - if an I/O error occurs