public class OutputStreamI extends java.lang.Object implements OutputStream
| Constructor and Description |
|---|
OutputStreamI(Communicator communicator) |
OutputStreamI(Communicator communicator,
BasicStream os) |
OutputStreamI(Communicator communicator,
EncodingVersion v) |
| 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 v)
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
OutputStream.writeObject(Ice.Object) to the stream. |
void |
writeProxy(ObjectPrx v)
Writes a proxy to the stream.
|
void |
writeSerializable(java.io.Serializable v)
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.
|
public OutputStreamI(Communicator communicator)
public OutputStreamI(Communicator communicator, EncodingVersion v)
public OutputStreamI(Communicator communicator, BasicStream os)
public Communicator communicator()
OutputStreamcommunicator in interface OutputStreampublic void writeBool(boolean v)
OutputStreamwriteBool in interface OutputStreamv - The boolean to write to the stream.public void writeBoolSeq(boolean[] v)
OutputStreamwriteBoolSeq in interface OutputStreamv - The sequence of booleans to write.
Passing null causes an empty sequence to be written to the stream.public void writeByte(byte v)
OutputStreamwriteByte in interface OutputStreamv - The byte to write to the stream.public void writeByteSeq(byte[] v)
OutputStreamwriteByteSeq in interface OutputStreamv - The sequence of bytes to write.
Passing null causes an empty sequence to be written to the stream.public void writeByteBuffer(java.nio.ByteBuffer v)
OutputStreamwriteByteBuffer in interface OutputStreamv - The ByteBuffer to write.
Passing null causes an empty sequence to be written to the stream.public void writeSerializable(java.io.Serializable v)
OutputStreamwriteSerializable in interface OutputStreamv - The serializable object to write.public void writeShort(short v)
OutputStreamwriteShort in interface OutputStreamv - The short to write to the stream.public void writeShortSeq(short[] v)
OutputStreamwriteShortSeq in interface OutputStreamv - The sequence of shorts to write.
Passing null causes an empty sequence to be written to the stream.public void writeShortBuffer(java.nio.ShortBuffer v)
OutputStreamwriteShortBuffer in interface OutputStreamv - The ShortBuffer to write.
Passing null causes an empty sequence to be written to the stream.public void writeInt(int v)
OutputStreamwriteInt in interface OutputStreamv - The integer to write to the stream.public void writeIntSeq(int[] v)
OutputStreamwriteIntSeq in interface OutputStreamv - The sequence of integers to write.
Passing null causes an empty sequence to be written to the stream.public void writeIntBuffer(java.nio.IntBuffer v)
OutputStreamwriteIntBuffer in interface OutputStreamv - The IntBuffer to write.
Passing null causes an empty sequence to be written to the stream.public void writeLong(long v)
OutputStreamwriteLong in interface OutputStreamv - The long to write to the stream.public void writeLongSeq(long[] v)
OutputStreamwriteLongSeq in interface OutputStreamv - The sequence of longs to write.
Passing null causes an empty sequence to be written to the stream.public void writeLongBuffer(java.nio.LongBuffer v)
OutputStreamwriteLongBuffer in interface OutputStreamv - The LongBuffer to write.
Passing null causes an empty sequence to be written to the stream.public void writeFloat(float v)
OutputStreamwriteFloat in interface OutputStreamv - The float to write to the stream.public void writeFloatSeq(float[] v)
OutputStreamwriteFloatSeq in interface OutputStreamv - The sequence of floats to write.
Passing null causes an empty sequence to be written to the stream.public void writeFloatBuffer(java.nio.FloatBuffer v)
OutputStreamwriteFloatBuffer in interface OutputStreamv - The FloatBuffer to write.
Passing null causes an empty sequence to be written to the stream.public void writeDouble(double v)
OutputStreamwriteDouble in interface OutputStreamv - The double to write to the stream.public void writeDoubleSeq(double[] v)
OutputStreamwriteDoubleSeq in interface OutputStreamv - The sequence of doubles to write.
Passing null causes an empty sequence to be written to the stream.public void writeDoubleBuffer(java.nio.DoubleBuffer v)
OutputStreamwriteDoubleBuffer in interface OutputStreamv - The DoubleBuffer to write.
Passing null causes an empty sequence to be written to the stream.public void writeString(java.lang.String v)
OutputStreamwriteString in interface OutputStreamv - The string to write to the stream. Passing null causes
an empty string to be written to the stream.public void writeStringSeq(java.lang.String[] v)
OutputStreamwriteStringSeq in interface OutputStreamv - The sequence of strings to write.
Passing null causes an empty sequence to be written to the stream.public void writeSize(int sz)
OutputStreamwriteSize in interface OutputStreamsz - The size to write.public void writeProxy(ObjectPrx v)
OutputStreamwriteProxy in interface OutputStreamv - The proxy to write.public void writeObject(Object v)
OutputStreamwriteObject in interface OutputStreamv - The class to write. This method writes the index of a Slice class; the state of the class is
written once OutputStream.writePendingObjects() is called.public void writeEnum(int v,
int maxValue)
OutputStreamwriteEnum in interface OutputStreamv - The enumerator.maxValue - The maximum enumerator value in the definition.public void writeException(UserException v)
OutputStreamwriteException in interface OutputStreamv - The user exception to write.public void startObject(SlicedData slicedData)
OutputStreamstartObject in interface OutputStreamslicedData - Preserved slices for this object, or null.public void endObject()
OutputStreamendObject in interface OutputStreampublic void startException(SlicedData slicedData)
OutputStreamstartException in interface OutputStreamslicedData - Preserved slices for this exception, or null.public void endException()
OutputStreamendException in interface OutputStreampublic void startSlice(java.lang.String typeId,
int compactId,
boolean last)
OutputStreamstartSlice in interface OutputStreamtypeId - 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.public void endSlice()
OutputStreamendSlice in interface OutputStreampublic void startEncapsulation(EncodingVersion encoding, FormatType format)
OutputStreamstartEncapsulation in interface OutputStreamencoding - The encoding version of the encapsulation.format - Specify the compact or sliced format.public void startEncapsulation()
OutputStreamstartEncapsulation in interface OutputStreampublic void endEncapsulation()
OutputStreamendEncapsulation in interface OutputStreampublic EncodingVersion getEncoding()
OutputStreamgetEncoding in interface OutputStreampublic void writePendingObjects()
OutputStreamOutputStream.writeObject(Ice.Object) to the stream.writePendingObjects in interface OutputStreampublic boolean writeOptional(int tag,
OptionalFormat format)
OutputStreamwriteOptional in interface OutputStreamtag - The numeric tag associated with the value.format - The optional format of the value.public int pos()
OutputStreampos in interface OutputStreampublic void rewrite(int sz,
int pos)
OutputStreamrewrite in interface OutputStreamsz - The 32-bit size value.pos - The position at which to write the value.public int startSize()
OutputStreamstartSize in interface OutputStreampublic void endSize(int pos)
OutputStreamendSize in interface OutputStreampos - The saved position.public byte[] finished()
OutputStreamfinished in interface OutputStreampublic void reset(boolean clearBuffer)
OutputStreamreset in interface OutputStreamclearBuffer - 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.public void destroy()
OutputStreamdestroy prior
to releasing the last reference to a stream; failure to do so may result in resource leaks.destroy in interface OutputStream