|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.io.InputStream
com.tangosol.io.WrapperDataInputStream
com.tangosol.io.WrapperObjectInputStream
public class WrapperObjectInputStream
This is an imitation ObjectInputStream class that provides the ObjectInput interface by delegating to an object that implements the ObjectInput interface. Primarily, this is intended as a base class for building specific-purpose ObjectInput wrappers.
Constructor Summary | |
---|---|
WrapperObjectInputStream(ObjectInput in) Construct a WrapperObjectInputStream that will read from the specified object implementing the ObjectInput interface. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.tangosol.io.WrapperDataInputStream |
---|
getDataInput, mark, markSupported, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, reset, skipBytes |
Methods inherited from interface java.io.DataInput |
---|
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes |
Constructor Detail |
---|
public WrapperObjectInputStream(ObjectInput in)
in
- an object implementing ObjectInput to read fromMethod Detail |
---|
public ObjectInput getObjectInput()
public Object readObject() throws ClassNotFoundException, IOException
readObject
in interface ObjectInput
ClassNotFoundException
- if the class of a serialized object object cannot be foundIOException
- if an I/O error occurspublic 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 InputStreaming
read
in interface ObjectInput
read
in class WrapperDataInputStream
-1
if the end of the stream has been reachedIOException
- if an I/O error occurspublic 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 InputStreaming
read
in interface ObjectInput
read
in class WrapperDataInputStream
ab
- 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 occurspublic 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 InputStreaming
read
in interface ObjectInput
read
in class WrapperDataInputStream
ab
- 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 ab
IOException
- if an I/O error occurspublic long skip(long cb) throws IOException
skip
in interface InputStreaming
skip
in interface ObjectInput
skip
in class WrapperDataInputStream
cb
- the maximum number of bytes to skip overIOException
- if an I/O error occurspublic int available() throws IOException
available
in interface InputStreaming
available
in interface ObjectInput
available
in class WrapperDataInputStream
IOException
- if an I/O error occurspublic void close() throws IOException
close
in interface InputStreaming
close
in interface Closeable
close
in interface ObjectInput
close
in class WrapperDataInputStream
IOException
- if an I/O error occurs
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |