Package com.sun.corba.se.impl.encoding
Class CDROutputStream
java.lang.Object
java.io.OutputStream
org.omg.CORBA.portable.OutputStream
org.omg.CORBA_2_3.portable.OutputStream
com.sun.corba.se.impl.encoding.CDROutputStream
- All Implemented Interfaces:
MarshalOutputStream,Closeable,Flushable,Serializable,AutoCloseable,DataOutputStream,IDLEntity,ValueBase,ValueOutputStream
- Direct Known Subclasses:
CorbaOutputObject,EncapsOutputStream
public abstract class CDROutputStream
extends OutputStream
implements MarshalOutputStream, DataOutputStream, ValueOutputStream
This is delegates to the real implementation.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CorbaMessageMediatorprotected ORBprotected ORBUtilSystemException -
Constructor Summary
ConstructorsConstructorDescriptionCDROutputStream(ORB orb, GIOPVersion version, byte encodingVersion, boolean littleEndian, BufferManagerWrite bufferManager, byte streamFormatVersion) CDROutputStream(ORB orb, GIOPVersion version, byte encodingVersion, boolean littleEndian, BufferManagerWrite bufferManager, byte streamFormatVersion, boolean usePooledByteBuffers) -
Method Summary
Modifier and TypeMethodDescriptionfinal String[]Provides truncatable repository ids.voidalignOnBoundary(int octetBoundary) final voidclose()abstract InputStreamReturns an input stream with the same buffer.protected CodeSetConversion.CTBConverterprotected abstract CodeSetConversion.CTBConverterfinal voidvoidThe end_value method ends any currently open chunk, writes the end tag for the nested custom valuetype, and decrements the valuetype nesting depth.final voidflush()protected final voidfinal BufferManagerWriteprotected final ByteBufferfinal GIOPVersionprotected final intgetIndex()protected intgetRealIndex(int index) protected final intgetSize()final booleanprotected final booleanisSharing(ByteBuffer bb) return true if our ByteBuffer is sharing/equal to bbfinal ORBorb()Returns the ORB that created this OutputStream.final voidprotected final voidsetByteBuffer(ByteBuffer byteBuffer) protected voidvoidsetHeaderPadding(boolean headerPadding) protected final voidsetIndex(int value) voidsetMessageMediator(MessageMediator messageMediator) final voidvoidstart_value(String rep_id) The start_value method ends any currently open chunk, writes a valuetype header for a nested custom valuetype (with a null codebase and the specified repository ID), and increments the valuetype nesting depth.final byte[]final voidwrite(byte[] b) final voidwrite(byte[] b, int off, int len) final voidwrite(int b) Writes an integer (length of arrays) onto this stream.final voidwrite_Abstract(Object value) Writes the IDL Abstract interface type to the output stream.final voidMarshals a value object or a stub object.final voidWrites an Any on this output stream.final voidwrite_any_array(Any[] seq, int offset, int length) Writes the array of IDL Anys from offset for length elements to the output stream.final voidwrite_boolean(boolean value) Writes a boolean value to this stream.final voidwrite_boolean_array(boolean[] value, int offset, int length) Writes an array of booleans on this output stream.final voidwrite_char(char value) Writes a char value to this stream.final voidwrite_char_array(char[] value, int offset, int length) Writes an array of chars on this output stream.final voidwrite_Context(Context ctx, ContextList contexts) Writes a CORBA context on this stream.final voidwrite_double(double value) Writes a double value to this stream.final voidwrite_double_array(double[] value, int offset, int length) Writes an array of doubles on this output stream.final voidwrite_fixed(BigDecimal value) Writes a BigDecimal number.final voidwrite_fixed(BigDecimal bigDecimal, short digits, short scale) final voidwrite_float(float value) Writes a float value to this stream.final voidwrite_float_array(float[] value, int offset, int length) Writes an array of floats on this output stream.final voidwrite_long(int value) Writes a CORBA long (i.e.final voidwrite_long_array(int[] value, int offset, int length) Writes an array of CORBA longs (i.e.final voidwrite_longlong(long value) Writes a CORBA longlong (i.e.final voidwrite_longlong_array(long[] value, int offset, int length) Writes an array of CORBA longlongs (i.e.final voidwrite_Object(Object value) Writes a CORBA Object on this output stream.final voidwrite_octet(byte value) Writes a CORBA octet (i.e. byte) value to this stream.final voidwrite_octet_array(byte[] value, int offset, int length) Writes an array of CORBA octets (bytes) on this output stream.final voidwrite_Principal(Principal value) Writes a Principle on this output stream.final voidwrite_short(short value) Writes a short value to this stream.final voidwrite_short_array(short[] value, int offset, int length) Writes an array of shorts on this output stream.final voidwrite_string(String value) Writes a string value to this stream.final voidwrite_TypeCode(TypeCode value) Writes a TypeCode on this output stream.final voidwrite_ulong(int value) Writes an unsigned CORBA long (i.e.final voidwrite_ulong_array(int[] value, int offset, int length) Writes an array of unsigned CORBA longs (i.e.final voidwrite_ulonglong(long value) Writes an unsigned CORBA longlong (i.e.final voidwrite_ulonglong_array(long[] value, int offset, int length) Writes an array of unsigned CORBA longlongs (i.e.final voidwrite_ushort(short value) Writes an unsigned short value to this stream.final voidwrite_ushort_array(short[] value, int offset, int length) Writes an array of unsigned shorts on this output stream.final voidwrite_value(Serializable value) Marshals a value type to the output stream.final voidwrite_value(Serializable value, Class clz) Marshals a value type to the output stream.final voidwrite_value(Serializable value, String repository_id) Marshals a value type to the output stream.final voidwrite_value(Serializable value, BoxedValueHelper factory) Marshals a value type to the output stream.final voidwrite_Value(Serializable value) Writes the IDL value type value to the output stream.final voidwrite_wchar(char value) Writes a wide char value to this stream.final voidwrite_wchar_array(char[] value, int offset, int length) Writes an array of wide chars on this output stream.final voidwrite_wstring(String value) Writes a wide string value to this stream.final voidwriteIndirection(int tag, int posIndirectedTo) final voidvoidMethods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
orb
-
wrapper
-
corbaMessageMediator
-
-
Constructor Details
-
CDROutputStream
public CDROutputStream(ORB orb, GIOPVersion version, byte encodingVersion, boolean littleEndian, BufferManagerWrite bufferManager, byte streamFormatVersion, boolean usePooledByteBuffers) -
CDROutputStream
public CDROutputStream(ORB orb, GIOPVersion version, byte encodingVersion, boolean littleEndian, BufferManagerWrite bufferManager, byte streamFormatVersion)
-
-
Method Details
-
create_input_stream
Description copied from class:OutputStreamReturns an input stream with the same buffer.- Specified by:
create_input_streamin interfaceMarshalOutputStream- Specified by:
create_input_streamin classOutputStream- Returns:
- an input stream with the same buffer.
-
write_boolean
public final void write_boolean(boolean value) Description copied from class:OutputStreamWrites a boolean value to this stream.- Specified by:
write_booleanin interfaceDataOutputStream- Specified by:
write_booleanin interfaceMarshalOutputStream- Specified by:
write_booleanin classOutputStream- Parameters:
value- the value to be written.
-
write_char
public final void write_char(char value) Description copied from class:OutputStreamWrites a char value to this stream.- Specified by:
write_charin interfaceDataOutputStream- Specified by:
write_charin interfaceMarshalOutputStream- Specified by:
write_charin classOutputStream- Parameters:
value- the value to be written.
-
write_wchar
public final void write_wchar(char value) Description copied from class:OutputStreamWrites a wide char value to this stream.- Specified by:
write_wcharin interfaceDataOutputStream- Specified by:
write_wcharin interfaceMarshalOutputStream- Specified by:
write_wcharin classOutputStream- Parameters:
value- the value to be written.
-
write_octet
public final void write_octet(byte value) Description copied from class:OutputStreamWrites a CORBA octet (i.e. byte) value to this stream.- Specified by:
write_octetin interfaceDataOutputStream- Specified by:
write_octetin interfaceMarshalOutputStream- Specified by:
write_octetin classOutputStream- Parameters:
value- the value to be written.
-
write_short
public final void write_short(short value) Description copied from class:OutputStreamWrites a short value to this stream.- Specified by:
write_shortin interfaceDataOutputStream- Specified by:
write_shortin interfaceMarshalOutputStream- Specified by:
write_shortin classOutputStream- Parameters:
value- the value to be written.
-
write_ushort
public final void write_ushort(short value) Description copied from class:OutputStreamWrites an unsigned short value to this stream.- Specified by:
write_ushortin interfaceDataOutputStream- Specified by:
write_ushortin interfaceMarshalOutputStream- Specified by:
write_ushortin classOutputStream- Parameters:
value- the value to be written.
-
write_long
public final void write_long(int value) Description copied from class:OutputStreamWrites a CORBA long (i.e. Java int) value to this stream.- Specified by:
write_longin interfaceDataOutputStream- Specified by:
write_longin interfaceMarshalOutputStream- Specified by:
write_longin classOutputStream- Parameters:
value- the value to be written.
-
write_ulong
public final void write_ulong(int value) Description copied from class:OutputStreamWrites an unsigned CORBA long (i.e. Java int) value to this stream.- Specified by:
write_ulongin interfaceDataOutputStream- Specified by:
write_ulongin interfaceMarshalOutputStream- Specified by:
write_ulongin classOutputStream- Parameters:
value- the value to be written.
-
write_longlong
public final void write_longlong(long value) Description copied from class:OutputStreamWrites a CORBA longlong (i.e. Java long) value to this stream.- Specified by:
write_longlongin interfaceDataOutputStream- Specified by:
write_longlongin interfaceMarshalOutputStream- Specified by:
write_longlongin classOutputStream- Parameters:
value- the value to be written.
-
write_ulonglong
public final void write_ulonglong(long value) Description copied from class:OutputStreamWrites an unsigned CORBA longlong (i.e. Java long) value to this stream.- Specified by:
write_ulonglongin interfaceDataOutputStream- Specified by:
write_ulonglongin interfaceMarshalOutputStream- Specified by:
write_ulonglongin classOutputStream- Parameters:
value- the value to be written.
-
write_float
public final void write_float(float value) Description copied from class:OutputStreamWrites a float value to this stream.- Specified by:
write_floatin interfaceDataOutputStream- Specified by:
write_floatin interfaceMarshalOutputStream- Specified by:
write_floatin classOutputStream- Parameters:
value- the value to be written.
-
write_double
public final void write_double(double value) Description copied from class:OutputStreamWrites a double value to this stream.- Specified by:
write_doublein interfaceDataOutputStream- Specified by:
write_doublein interfaceMarshalOutputStream- Specified by:
write_doublein classOutputStream- Parameters:
value- the value to be written.
-
write_string
Description copied from class:OutputStreamWrites a string value to this stream.- Specified by:
write_stringin interfaceDataOutputStream- Specified by:
write_stringin interfaceMarshalOutputStream- Specified by:
write_stringin classOutputStream- Parameters:
value- the value to be written.
-
write_wstring
Description copied from class:OutputStreamWrites a wide string value to this stream.- Specified by:
write_wstringin interfaceDataOutputStream- Specified by:
write_wstringin interfaceMarshalOutputStream- Specified by:
write_wstringin classOutputStream- Parameters:
value- the value to be written.
-
write_boolean_array
public final void write_boolean_array(boolean[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of booleans on this output stream.- Specified by:
write_boolean_arrayin interfaceDataOutputStream- Specified by:
write_boolean_arrayin interfaceMarshalOutputStream- Specified by:
write_boolean_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_char_array
public final void write_char_array(char[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of chars on this output stream.- Specified by:
write_char_arrayin interfaceDataOutputStream- Specified by:
write_char_arrayin interfaceMarshalOutputStream- Specified by:
write_char_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_wchar_array
public final void write_wchar_array(char[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of wide chars on this output stream.- Specified by:
write_wchar_arrayin interfaceDataOutputStream- Specified by:
write_wchar_arrayin interfaceMarshalOutputStream- Specified by:
write_wchar_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_octet_array
public final void write_octet_array(byte[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of CORBA octets (bytes) on this output stream.- Specified by:
write_octet_arrayin interfaceDataOutputStream- Specified by:
write_octet_arrayin interfaceMarshalOutputStream- Specified by:
write_octet_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_short_array
public final void write_short_array(short[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of shorts on this output stream.- Specified by:
write_short_arrayin interfaceDataOutputStream- Specified by:
write_short_arrayin interfaceMarshalOutputStream- Specified by:
write_short_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_ushort_array
public final void write_ushort_array(short[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of unsigned shorts on this output stream.- Specified by:
write_ushort_arrayin interfaceDataOutputStream- Specified by:
write_ushort_arrayin interfaceMarshalOutputStream- Specified by:
write_ushort_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_long_array
public final void write_long_array(int[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of CORBA longs (i.e. Java ints) on this output stream.- Specified by:
write_long_arrayin interfaceDataOutputStream- Specified by:
write_long_arrayin interfaceMarshalOutputStream- Specified by:
write_long_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_ulong_array
public final void write_ulong_array(int[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of unsigned CORBA longs (i.e. Java ints) on this output stream.- Specified by:
write_ulong_arrayin interfaceDataOutputStream- Specified by:
write_ulong_arrayin interfaceMarshalOutputStream- Specified by:
write_ulong_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_longlong_array
public final void write_longlong_array(long[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of CORBA longlongs (i.e. Java longs) on this output stream.- Specified by:
write_longlong_arrayin interfaceDataOutputStream- Specified by:
write_longlong_arrayin interfaceMarshalOutputStream- Specified by:
write_longlong_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_ulonglong_array
public final void write_ulonglong_array(long[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of unsigned CORBA longlongs (i.e. Java ints) on this output stream.- Specified by:
write_ulonglong_arrayin interfaceDataOutputStream- Specified by:
write_ulonglong_arrayin interfaceMarshalOutputStream- Specified by:
write_ulonglong_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_float_array
public final void write_float_array(float[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of floats on this output stream.- Specified by:
write_float_arrayin interfaceDataOutputStream- Specified by:
write_float_arrayin interfaceMarshalOutputStream- Specified by:
write_float_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_double_array
public final void write_double_array(double[] value, int offset, int length) Description copied from class:OutputStreamWrites an array of doubles on this output stream.- Specified by:
write_double_arrayin interfaceDataOutputStream- Specified by:
write_double_arrayin interfaceMarshalOutputStream- Specified by:
write_double_arrayin classOutputStream- Parameters:
value- the array to be written.offset- offset on the stream.length- length of buffer to write.
-
write_Object
Description copied from class:OutputStreamWrites a CORBA Object on this output stream.- Specified by:
write_Objectin interfaceDataOutputStream- Specified by:
write_Objectin interfaceMarshalOutputStream- Specified by:
write_Objectin classOutputStream- Parameters:
value- the value to be written.
-
write_TypeCode
Description copied from class:OutputStreamWrites a TypeCode on this output stream.- Specified by:
write_TypeCodein interfaceDataOutputStream- Specified by:
write_TypeCodein interfaceMarshalOutputStream- Specified by:
write_TypeCodein classOutputStream- Parameters:
value- the value to be written.
-
write_any
Description copied from class:OutputStreamWrites an Any on this output stream.- Specified by:
write_anyin interfaceDataOutputStream- Specified by:
write_anyin interfaceMarshalOutputStream- Specified by:
write_anyin classOutputStream- Parameters:
value- the value to be written.
-
write_Principal
Description copied from class:OutputStreamWrites a Principle on this output stream.- Specified by:
write_Principalin interfaceMarshalOutputStream- Overrides:
write_Principalin classOutputStream- Parameters:
value- the value to be written.
-
write
Description copied from class:OutputStreamWrites an integer (length of arrays) onto this stream.- Overrides:
writein classOutputStream- Parameters:
b- the value to be written.- Throws:
IOException- if there is an input/output error- See Also:
-
write_fixed
Description copied from class:OutputStreamWrites a BigDecimal number.- Overrides:
write_fixedin classOutputStream- Parameters:
value- a BidDecimal--value to be written.
-
write_Context
Description copied from class:OutputStreamWrites a CORBA context on this stream. The Context is marshaled as a sequence of strings. Only those Context values specified in the contexts parameter are actually written.- Overrides:
write_Contextin classOutputStream- Parameters:
ctx- a CORBA contextcontexts- aContextListobject containing the list of contexts to be written- See Also:
-
orb
Description copied from class:OutputStreamReturns the ORB that created this OutputStream.- Overrides:
orbin classOutputStream- Returns:
- the ORB that created this OutputStream
- See Also:
-
write_value
Description copied from class:OutputStreamMarshals a value type to the output stream.- Specified by:
write_valuein interfaceMarshalOutputStream- Overrides:
write_valuein classOutputStream- Parameters:
value- is the acutal value to write
-
write_value
Description copied from class:OutputStreamMarshals a value type to the output stream.- Overrides:
write_valuein classOutputStream- Parameters:
value- is the acutal value to writeclz- is the declared type of the value to be marshaled
-
write_value
Description copied from class:OutputStreamMarshals a value type to the output stream.- Overrides:
write_valuein classOutputStream- Parameters:
value- is the acutal value to writerepository_id- identifies the type of the value type to be marshaled
-
write_value
Description copied from class:OutputStreamMarshals a value type to the output stream.- Overrides:
write_valuein classOutputStream- Parameters:
value- is the acutal value to writefactory- is the instance of the helper to be used for marshaling the boxed value
-
write_abstract_interface
Description copied from class:OutputStreamMarshals a value object or a stub object.- Overrides:
write_abstract_interfacein classOutputStream- Parameters:
obj- the actual value object to marshal or the stub to be marshalled
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
start_block
public final void start_block()- Specified by:
start_blockin interfaceMarshalOutputStream
-
end_block
public final void end_block()- Specified by:
end_blockin interfaceMarshalOutputStream
-
putEndian
public final void putEndian()- Specified by:
putEndianin interfaceMarshalOutputStream
-
writeTo
- Specified by:
writeToin interfaceMarshalOutputStream- Throws:
IOException
-
toByteArray
public final byte[] toByteArray()- Specified by:
toByteArrayin interfaceMarshalOutputStream
-
write_Abstract
Description copied from interface:DataOutputStreamWrites the IDL Abstract interface type to the output stream.- Specified by:
write_Abstractin interfaceDataOutputStream- Parameters:
value- The value to be written.
-
write_Value
Description copied from interface:DataOutputStreamWrites the IDL value type value to the output stream.- Specified by:
write_Valuein interfaceDataOutputStream- Parameters:
value- The value to be written.
-
write_any_array
Description copied from interface:DataOutputStreamWrites the array of IDL Anys from offset for length elements to the output stream.- Specified by:
write_any_arrayin interfaceDataOutputStream- Parameters:
seq- The array to be written.offset- The index into seq of the first element to write to the output stream.length- The number of elements to write to the output stream.
-
setMessageMediator
-
getMessageMediator
-
_truncatable_ids
Description copied from interface:ValueBaseProvides truncatable repository ids.- Specified by:
_truncatable_idsin interfaceValueBase- Returns:
- a String array--list of truncatable repository ids.
-
getSize
protected final int getSize() -
getIndex
protected final int getIndex() -
getRealIndex
protected int getRealIndex(int index) -
setIndex
protected final void setIndex(int value) -
getByteBuffer
-
setByteBuffer
-
isSharing
return true if our ByteBuffer is sharing/equal to bb -
isLittleEndian
public final boolean isLittleEndian() -
getByteBufferWithInfo
-
setByteBufferWithInfo
-
getBufferManager
-
write_fixed
-
writeOctetSequenceTo
-
getGIOPVersion
-
writeIndirection
public final void writeIndirection(int tag, int posIndirectedTo) -
createCharCTBConverter
-
createWCharCTBConverter
-
freeInternalCaches
protected final void freeInternalCaches() -
alignOnBoundary
public void alignOnBoundary(int octetBoundary) -
setHeaderPadding
public void setHeaderPadding(boolean headerPadding) -
start_value
Description copied from interface:ValueOutputStreamThe start_value method ends any currently open chunk, writes a valuetype header for a nested custom valuetype (with a null codebase and the specified repository ID), and increments the valuetype nesting depth.- Specified by:
start_valuein interfaceValueOutputStream
-
end_value
public void end_value()Description copied from interface:ValueOutputStreamThe end_value method ends any currently open chunk, writes the end tag for the nested custom valuetype, and decrements the valuetype nesting depth.- Specified by:
end_valuein interfaceValueOutputStream
-