public interface OutputStream
InputStream| Modifier and Type | Method and Description |
|---|---|
Communicator |
communicator()
Returns the communicator for this output stream.
|
void |
destroy()
Destroys the stream and its associated resources.
|
void |
endEncapsulation()
Ends the previous encapsulation.
|
void |
endException()
Marks the end of a user exception.
|
void |
endObject()
Marks the end of an Ice object.
|
void |
endSize(int pos)
Computes the amount of data written since the previous call to startSize and
writes that value at the saved position.
|
void |
endSlice()
Marks the end of a slice for an Ice object or user exception.
|
byte[] |
finished()
Indicates that marshaling of a request or reply is finished.
|
EncodingVersion |
getEncoding()
Determines the current encoding version.
|
int |
pos()
Determines the current position in the stream.
|
void |
reset(boolean clearBuffer)
Resets this output stream.
|
void |
rewrite(int sz,
int pos)
Inserts a fixed 32-bit size value into the stream at the given position.
|
void |
startEncapsulation()
Writes the start of an encapsulation to the stream.
|
void |
startEncapsulation(EncodingVersion encoding,
FormatType format)
Writes the start of an encapsulation to the stream.
|
void |
startException(SlicedData slicedData)
Marks the start of a user exception.
|
void |
startObject(SlicedData slicedData)
Marks the start of an Ice object.
|
int |
startSize()
Returns the current position and allocates four bytes for a fixed-length (32-bit)
size value.
|
void |
startSlice(java.lang.String typeId,
int compactId,
boolean last)
Marks the start of a new slice for an Ice object or user exception.
|
void |
writeBool(boolean v)
Writes a boolean to the stream.
|
void |
writeBoolSeq(boolean[] v)
Writes a sequence of booleans to the stream.
|
void |
writeByte(byte v)
Writes a byte to the stream.
|
void |
writeByteBuffer(java.nio.ByteBuffer v)
Writes a ByteBuffer to the stream.
|
void |
writeByteSeq(byte[] v)
Writes a sequence of bytes to the stream.
|
void |
writeDouble(double v)
Writes a double to the stream.
|
void |
writeDoubleBuffer(java.nio.DoubleBuffer v)
Writes a DoubleBuffer to the stream.
|
void |
writeDoubleSeq(double[] v)
Writes a sequence of doubles to the stream.
|
void |
writeEnum(int v,
int maxValue)
Write an enumerated value.
|
void |
writeException(UserException ex)
Writes a user exception to the stream.
|
void |
writeFloat(float v)
Writes a float to the stream.
|
void |
writeFloatBuffer(java.nio.FloatBuffer v)
Writes a FloatBuffer to the stream.
|
void |
writeFloatSeq(float[] v)
Writes a sequence of floats to the stream.
|
void |
writeInt(int v)
Writes an integer to the stream.
|
void |
writeIntBuffer(java.nio.IntBuffer v)
Writes a IntBuffer to the stream.
|
void |
writeIntSeq(int[] v)
Writes a sequence of integers to the stream.
|
void |
writeLong(long v)
Writes a long to the stream.
|
void |
writeLongBuffer(java.nio.LongBuffer v)
Writes a LongBuffer to the stream.
|
void |
writeLongSeq(long[] v)
Writes a sequence of longs to the stream.
|
void |
writeObject(Object v)
Writes a Slice class to the stream.
|
boolean |
writeOptional(int tag,
OptionalFormat format)
Write the header information for an optional value.
|
void |
writePendingObjects()
Writes the state of Slice classes whose index was previously
written with
writeObject(Ice.Object) to the stream. |
void |
writeProxy(ObjectPrx v)
Writes a proxy to the stream.
|
void |
writeSerializable(java.io.Serializable o)
Writes a serializable Java object to the stream.
|
void |
writeShort(short v)
Writes a short to the stream.
|
void |
writeShortBuffer(java.nio.ShortBuffer v)
Writes a ShortBuffer to the stream.
|
void |
writeShortSeq(short[] v)
Writes a sequence of shorts to the stream.
|
void |
writeSize(int sz)
Writes a size to the stream.
|
void |
writeString(java.lang.String v)
Writes a string to the stream.
|
void |
writeStringSeq(java.lang.String[] v)
Writes a sequence of strings to the stream.
|
Communicator communicator()
void writeBool(boolean v)
v - The boolean to write to the stream.void writeBoolSeq(boolean[] v)
v - The sequence of booleans to write.
Passing null causes an empty sequence to be written to the stream.void writeByte(byte v)
v - The byte to write to the stream.void writeByteSeq(byte[] v)
v - The sequence of bytes to write.
Passing null causes an empty sequence to be written to the stream.void writeByteBuffer(java.nio.ByteBuffer v)
v - The ByteBuffer to write.
Passing null causes an empty sequence to be written to the stream.void writeSerializable(java.io.Serializable o)
o - The serializable object to write.void writeShort(short v)
v - The short to write to the stream.void writeShortSeq(short[] v)
v - The sequence of shorts to write.
Passing null causes an empty sequence to be written to the stream.void writeShortBuffer(java.nio.ShortBuffer v)
v - The ShortBuffer to write.
Passing null causes an empty sequence to be written to the stream.void writeInt(int v)
v - The integer to write to the stream.void writeIntSeq(int[] v)
v - The sequence of integers to write.
Passing null causes an empty sequence to be written to the stream.void writeIntBuffer(java.nio.IntBuffer v)
v - The IntBuffer to write.
Passing null causes an empty sequence to be written to the stream.void writeLong(long v)
v - The long to write to the stream.void writeLongSeq(long[] v)
v - The sequence of longs to write.
Passing null causes an empty sequence to be written to the stream.void writeLongBuffer(java.nio.LongBuffer v)
v - The LongBuffer to write.
Passing null causes an empty sequence to be written to the stream.void writeFloat(float v)
v - The float to write to the stream.void writeFloatSeq(float[] v)
v - The sequence of floats to write.
Passing null causes an empty sequence to be written to the stream.void writeFloatBuffer(java.nio.FloatBuffer v)
v - The FloatBuffer to write.
Passing null causes an empty sequence to be written to the stream.void writeDouble(double v)
v - The double to write to the stream.void writeDoubleSeq(double[] v)
v - The sequence of doubles to write.
Passing null causes an empty sequence to be written to the stream.void writeDoubleBuffer(java.nio.DoubleBuffer v)
v - The DoubleBuffer to write.
Passing null causes an empty sequence to be written to the stream.void writeString(java.lang.String v)
v - The string to write to the stream. Passing null causes
an empty string to be written to the stream.void writeStringSeq(java.lang.String[] v)
v - The sequence of strings to write.
Passing null causes an empty sequence to be written to the stream.void writeSize(int sz)
sz - The size to write.void writeProxy(ObjectPrx v)
v - The proxy to write.void writeObject(Object v)
v - The class to write. This method writes the index of a Slice class; the state of the class is
written once writePendingObjects() is called.void writeEnum(int v,
int maxValue)
v - The enumerator.maxValue - The maximum enumerator value in the definition.void writeException(UserException ex)
ex - The user exception to write.void startObject(SlicedData slicedData)
slicedData - Preserved slices for this object, or null.void endObject()
void startException(SlicedData slicedData)
slicedData - Preserved slices for this exception, or null.void endException()
void startSlice(java.lang.String typeId,
int compactId,
boolean last)
typeId - The Slice type ID corresponding to this slice.compactId - The Slice compact type ID corresponding to
this slice or -1 if no compact ID is defined for the
type ID.last - True if this is the last slice, false otherwise.void endSlice()
void startEncapsulation(EncodingVersion encoding, FormatType format)
encoding - The encoding version of the encapsulation.format - Specify the compact or sliced format.void startEncapsulation()
void endEncapsulation()
EncodingVersion getEncoding()
void writePendingObjects()
writeObject(Ice.Object) to the stream.boolean writeOptional(int tag,
OptionalFormat format)
tag - The numeric tag associated with the value.format - The optional format of the value.int pos()
void rewrite(int sz,
int pos)
sz - The 32-bit size value.pos - The position at which to write the value.int startSize()
void endSize(int pos)
pos - The saved position.byte[] finished()
void reset(boolean clearBuffer)
clearBuffer - If true, the stream's internal buffer becomes eligible for
garbage collection; if false, the stream's internal buffer is retained, to avoid
creating unnecessary garbage. If retained, the internal buffer may be resized to a smaller
capacity. Either way, reset resets the stream's writing position to zero.void destroy()
destroy prior
to releasing the last reference to a stream; failure to do so may result in resource leaks.