public class InputStreamI extends java.lang.Object implements InputStream
| Constructor and Description |
|---|
InputStreamI(Communicator communicator,
byte[] data,
boolean copyData) |
InputStreamI(Communicator communicator,
byte[] data,
EncodingVersion v,
boolean copyData) |
| Modifier and Type | Method and Description |
|---|---|
Communicator |
communicator()
Returns the communicator for this input stream.
|
void |
destroy()
Destroys the stream and its associated resources.
|
void |
endEncapsulation()
Indicates that the end of an encapsulation has been reached.
|
SlicedData |
endException(boolean preserve)
Marks the end of a user exception.
|
SlicedData |
endObject(boolean preserve)
Marks the end of an Ice object.
|
void |
endSlice()
Indicates that the end of an object or exception slice has been reached.
|
EncodingVersion |
getEncoding()
Determines the current encoding version.
|
int |
pos() |
int |
readAndCheckSeqSize(int minWire)
Extracts and check a sequence size from the stream.
|
boolean |
readBool()
Extracts a boolean value from the stream.
|
boolean[] |
readBoolSeq()
Extracts a sequence of boolean values from the stream.
|
byte |
readByte()
Extracts a byte value from the stream.
|
java.nio.ByteBuffer |
readByteBuffer()
Extracts a sequence of byte values from the stream as a ByteBuffer.
|
byte[] |
readByteSeq()
Extracts a sequence of byte values from the stream.
|
double |
readDouble()
Extracts a double value from the stream.
|
java.nio.DoubleBuffer |
readDoubleBuffer()
Extracts a sequence of double values from the stream as a DoubleBuffer.
|
double[] |
readDoubleSeq()
Extracts a sequence of double values from the stream.
|
int |
readEnum(int maxValue)
Read an enumerated value.
|
float |
readFloat()
Extracts a float value from the stream.
|
java.nio.FloatBuffer |
readFloatBuffer()
Extracts a sequence of float values from the stream as a FloatBuffer.
|
float[] |
readFloatSeq()
Extracts a sequence of float values from the stream.
|
int |
readInt()
Extracts an integer value from the stream.
|
java.nio.IntBuffer |
readIntBuffer()
Extracts a sequence of int values from the stream as a IntBuffer.
|
int[] |
readIntSeq()
Extracts a sequence of integer values from the stream.
|
long |
readLong()
Extracts a long value from the stream.
|
java.nio.LongBuffer |
readLongBuffer()
Extracts a sequence of long values from the stream as a LongBuffer.
|
long[] |
readLongSeq()
Extracts a sequence of long values from the stream.
|
void |
readObject(ReadObjectCallback cb)
Extracts the index of a Slice class from the stream.
|
boolean |
readOptional(int tag,
OptionalFormat format)
Determine if an optional value is available for reading.
|
void |
readPendingObjects()
Indicates that unmarshaling is complete, except for any Slice objects.
|
ObjectPrx |
readProxy()
Extracts a proxy from the stream.
|
java.io.Serializable |
readSerializable()
Extracts a serializable Java object from the stream.
|
short |
readShort()
Extracts a short value from the stream.
|
java.nio.ShortBuffer |
readShortBuffer()
Extracts a sequence of short values from the stream as a ShortBuffer.
|
short[] |
readShortSeq()
Extracts a sequence of short values from the stream.
|
int |
readSize()
Extracts a size from the stream.
|
java.lang.String |
readString()
Extracts a string from the stream.
|
java.lang.String[] |
readStringSeq()
Extracts a string sequence from the stream.
|
void |
rewind()
Resets the read position of the stream to the beginning.
|
void |
skip(int sz)
Skips ahead in the stream.
|
EncodingVersion |
skipEncapsulation()
Skips over an encapsulation.
|
void |
skipSize()
Skips over a size value.
|
void |
skipSlice()
Skips over an object or exception slice.
|
void |
sliceObjects(boolean slice)
Determines the behavior of the stream when extracting Slice objects.
|
EncodingVersion |
startEncapsulation()
Reads the start of an encapsulation.
|
void |
startException()
Marks the start of a user exception.
|
void |
startObject()
Marks the start of an Ice object.
|
java.lang.String |
startSlice()
Reads the start of an object or exception slice.
|
void |
throwException()
Extracts a user exception from the stream and throws it.
|
void |
throwException(UserExceptionReaderFactory factory)
Extracts a user exception from the stream and throws it, using the supplied
factory to instantiate a UserExceptionReader.
|
public InputStreamI(Communicator communicator, byte[] data, boolean copyData)
public InputStreamI(Communicator communicator, byte[] data, EncodingVersion v, boolean copyData)
public Communicator communicator()
InputStreamcommunicator in interface InputStreampublic void sliceObjects(boolean slice)
InputStreamsliceObjects in interface InputStreamslice - If true (the default), slicing is enabled; if false,
slicing is disabled. If slicing is disabled and the stream encounters a Slice type ID
during decoding for which no object factory is installed, it raises NoObjectFactoryException.public boolean readBool()
InputStreamreadBool in interface InputStreampublic boolean[] readBoolSeq()
InputStreamreadBoolSeq in interface InputStreampublic byte readByte()
InputStreamreadByte in interface InputStreampublic byte[] readByteSeq()
InputStreamreadByteSeq in interface InputStreampublic java.nio.ByteBuffer readByteBuffer()
InputStreamreadByteBuffer in interface InputStreampublic java.io.Serializable readSerializable()
InputStreamreadSerializable in interface InputStreampublic short readShort()
InputStreamreadShort in interface InputStreampublic short[] readShortSeq()
InputStreamreadShortSeq in interface InputStreampublic java.nio.ShortBuffer readShortBuffer()
InputStreamreadShortBuffer in interface InputStreampublic int readInt()
InputStreamreadInt in interface InputStreampublic int[] readIntSeq()
InputStreamreadIntSeq in interface InputStreampublic java.nio.IntBuffer readIntBuffer()
InputStreamreadIntBuffer in interface InputStreampublic long readLong()
InputStreamreadLong in interface InputStreampublic long[] readLongSeq()
InputStreamreadLongSeq in interface InputStreampublic java.nio.LongBuffer readLongBuffer()
InputStreamreadLongBuffer in interface InputStreampublic float readFloat()
InputStreamreadFloat in interface InputStreampublic float[] readFloatSeq()
InputStreamreadFloatSeq in interface InputStreampublic java.nio.FloatBuffer readFloatBuffer()
InputStreamreadFloatBuffer in interface InputStreampublic double readDouble()
InputStreamreadDouble in interface InputStreampublic double[] readDoubleSeq()
InputStreamreadDoubleSeq in interface InputStreampublic java.nio.DoubleBuffer readDoubleBuffer()
InputStreamreadDoubleBuffer in interface InputStreampublic java.lang.String readString()
InputStreamreadString in interface InputStreampublic java.lang.String[] readStringSeq()
InputStreamreadStringSeq in interface InputStreampublic int readSize()
InputStreamreadSize in interface InputStreampublic int readAndCheckSeqSize(int minWire)
InputStreamreadAndCheckSeqSize in interface InputStreamminWire - The minimum size of an element of the sequence.public ObjectPrx readProxy()
InputStreamreadProxy in interface InputStreampublic void readObject(ReadObjectCallback cb)
InputStreamreadObject in interface InputStreamcb - The callback to notify the application when the extracted instance is available.
The Ice run time extracts Slice classes in stages. The Ice run time calls ReadObjectCallback.invoke(Ice.Object)
when the corresponding instance has been fully unmarshaled.ReadObjectCallbackpublic int readEnum(int maxValue)
InputStreamreadEnum in interface InputStreammaxValue - The maximum enumerator value in the definition.public void throwException()
throws UserException
InputStreamthrowException in interface InputStreamUserException - The user exception that was unmarshaled.public void throwException(UserExceptionReaderFactory factory) throws UserException
InputStreamthrowException in interface InputStreamfactory - A factory that creates UserExceptionReader instances.UserException - The user exception that was unmarshaled.public void startObject()
InputStreamstartObject in interface InputStreampublic SlicedData endObject(boolean preserve)
InputStreamendObject in interface InputStreampreserve - Pass true and the stream will preserve the unknown slices of the instance, or false
to discard the unknown slices.public void startException()
InputStreamstartException in interface InputStreampublic SlicedData endException(boolean preserve)
InputStreamendException in interface InputStreampreserve - Pass true and the stream will preserve the unknown slices of the exception, or false
to discard the unknown slices.public java.lang.String startSlice()
InputStreamstartSlice in interface InputStreampublic void endSlice()
InputStreamendSlice in interface InputStreampublic void skipSlice()
InputStreamskipSlice in interface InputStreampublic EncodingVersion startEncapsulation()
InputStreamstartEncapsulation in interface InputStreampublic void endEncapsulation()
InputStreamendEncapsulation in interface InputStreampublic EncodingVersion skipEncapsulation()
InputStreamskipEncapsulation in interface InputStreampublic EncodingVersion getEncoding()
InputStreamgetEncoding in interface InputStreampublic void readPendingObjects()
InputStreamreadPendingObjects triggers the
calls to ReadObjectCallback.invoke(Ice.Object) that inform the application that unmarshaling of a Slice
object is complete.readPendingObjects in interface InputStreampublic void rewind()
InputStreamrewind in interface InputStreampublic void skip(int sz)
InputStreamskip in interface InputStreamsz - The number of bytes to skip.public void skipSize()
InputStreamskipSize in interface InputStreampublic boolean readOptional(int tag,
OptionalFormat format)
InputStreamreadOptional in interface InputStreamtag - The tag associated with the value.format - The optional format for the value.public int pos()
pos in interface InputStreampublic void destroy()
InputStreamdestroy prior
to releasing the last reference to a stream; failure to do so may result in resource leaks.destroy in interface InputStream