org.jacorb.orb
public class CDROutputStream extends OutputStream
Version: $Id: CDROutputStream.java,v 1.123 2007/04/26 23:07:26 francisco Exp $ A stream for CDR marshalling.
Field Summary | |
---|---|
protected byte[] | buffer |
protected int | giop_minor |
Constructor Summary | |
---|---|
CDROutputStream()
OutputStreams created using the empty constructor are used for
in memory marshaling, but do not use the ORB's output buffer
manager. | |
CDROutputStream(ORB orb)
OutputStreams created using this constructor
are used also for in memory marshaling, but do use the
ORB's output buffer manager | |
CDROutputStream(byte[] buf)
Class constructor setting the buffer size for the message and
the character encoding sets. |
Method Summary | |
---|---|
void | beginEncapsulatedArray()
Can be used locally for data type conversions
without preceeding call to beginEncapsulation, i.e.
without a leading long that indicates the size. |
void | beginEncapsulation()
Start a CDR encapsulation. |
void | close() |
void | configure(Configuration configuration)
This stream is self-configuring, i.e. configure() is private
and only called from the constructor
TODO this led to situations were streams weren't configured properly
(see callers of configure) so i changed the method to be public.
should be fixed. alphonse 11.05.2006 |
InputStream | create_input_stream()
The following operations are from OutputStream *
|
void | endEncapsulation()
Terminate the encapsulation by writing its length
to its beginning. |
protected void | finalize() |
byte[] | getBufferCopy() |
int | getGIOPMinor() |
void | increaseSize(int amount)
Add amount empty space |
ORB | orb() |
void | reduceSize(int amount) |
void | reset() |
void | setBuffer(byte[] b) |
void | setBufferWithoutReset(byte[] b, int size) |
void | setCodeSet(int codeSet, int codeSetWide) |
void | setGIOPMinor(int giop_minor) |
int | size() |
void | skip(int step) |
void | updateMutatorConnection(GIOPConnection connection)updateMutatorConnection is an accessor that updates the
ior mutator.
|
void | write(OutputStream out, int start, int length)
write the contents of this CDR stream to the output stream,
includes all deferred writes (e.g., for byte arrays)...
called by, e.g. |
void | write_abstract_interface(Object object)
Writes an abstract interface to this stream. |
void | write_any(Any value) |
void | write_boolean(boolean value) |
void | write_boolean_array(boolean[] value, int offset, int length) |
void | write_char(char c)write_char writes a character to the output stream. |
void | write_char_array(char[] value, int offset, int length) |
void | write_double(double value) |
void | write_double_array(double[] value, int offset, int length) |
void | write_fixed(BigDecimal value, short digits, short scale) |
void | write_fixed(BigDecimal value) |
void | write_float(float value) |
void | write_float_array(float[] value, int offset, int length) |
void | write_IOR(IOR ior) |
void | write_long(int value) |
void | write_longlong(long value) |
void | write_longlong_array(long[] value, int offset, int length) |
void | write_long_array(int[] value, int offset, int length) |
void | write_octet(byte value) |
void | write_octet_array(byte[] value, int offset, int length) |
void | write_Object(Object value) |
void | write_Principal(Principal value) |
void | write_short(short value) |
void | write_short_array(short[] value, int offset, int length) |
void | write_string(String s)write_string writes a string to the output stream. |
void | write_TypeCode(TypeCode typeCode) |
void | write_ulong(int value) |
void | write_ulonglong(long value) |
void | write_ulonglong_array(long[] value, int offset, int length) |
void | write_ulong_array(int[] value, int offset, int length) |
void | write_ushort(short value) |
void | write_ushort_array(short[] value, int offset, int length) |
void | write_value(TypeCode typeCode, InputStream input)
Reads a value of the type indicated by tc from the
InputStream in and remarshals it to this CDROutputStream.
|
void | write_value(Serializable value)
Writes the serialized state of `value' to this stream. |
void | write_value(Serializable value, BoxedValueHelper factory) |
void | write_value(Serializable value, Class clazz) |
void | write_value(Serializable value, String repository_id) |
void | write_wchar(char c) |
void | write_wchar_array(char[] value, int offset, int length) |
void | write_wstring(String s) |
updateMutatorConnection
is an accessor that updates the
ior mutator.
By making callers pass in a GIOPConnection not a transport this allows
callers to not have to call getTransport which would require a synchronized
lock. Therefore if the mutator has not been enabled this is effectively a
NOP.
Parameters: connection an org.omg.ETF.Connection
value
write_char
writes a character to the output stream. If
codeset translation is active then it will use String and an encoding to
get the bytes. It can then do a test for whether to throw DATA_CONVERSION.
Parameters: c a char
value
write_string
writes a string to the output stream. It is
optimised for whether it is writing a blank string or for whether codeset
translation is active.
Parameters: s a String
value
tc
from the
InputStream in
and remarshals it to this CDROutputStream.
Called from Any.