## org.openorb.iiop
Class CDROutputStream

    java.lang.Object
      |
      +--java.io.OutputStream
            |
            +--org.omg.CORBA.portable.OutputStream
                  |
                  +--org.omg.CORBA_2_3.portable.OutputStream
                        |
                        +--org.openorb.iiop.CDROutputStream

All Implemented Interfaces:
  ExtendedOutputStream, org.apache.avalon.framework.logger.LogEnabled

public class CDROutputStream
extends OutputStream
implements ExtendedOutputStream, org.apache.avalon.framework.logger.LogEnabled

This class implements CDR for IIOP

Version:
  $Revision: 1.24 $ $Date: 2002/09/24 05:31:28 $
Author:
  Chris Wood

Constructor Summary
`CDROutputStream(ORB orb, Version version, MarshalBuffer buf)` Constructor used by message level, fragments may be sent as elements are appended to the stream, so create_input_stream is disallowed.

Method Summary
`void` `alignment(int align)` Set alignment into the buffer
`void` `begin_encapsulation()` Begin an encapsulated block.
`void` `close()` Complete marshaling a message.
`InputStream` `create_input_stream()` This operation is not implemented.
`void` `enableLogging(org.apache.avalon.framework.logger.Logger logger)`
`void` `end_encapsulation()` End an encapsulated block.
`void` `flush()` Does nothing.
`int` `index()` Current index into the buffer.
`ORB` `orb()` Get the orb associated with the stream.
`void` `pending_alignment(int align)` The next call to align will result in aligning to the specified boundary if the reuested alignment is smaller.
`void` `setCodesets(int tcsc, int tcsw)`
`Version` `version()` Return the CDR protocol version
`void` `write_abstract_interface(java.lang.Object obj)` Write an abstract interface
`void` `write_any(Any val)` Add an CORBA any to the stream.
`void` `write_boolean_array(boolean[] val, int off, int len)` Write an array of boolean values.
`void` `write_boolean(boolean val)` Append boolean value
`void` `write_char_array(char[] val, int off, int len)` Write an array of char values.
`void` `write_char(char val)` Add an IDL char into the steam.
`void` `write_Context(Context ctx, ContextList contexts)` Write operation context list.
`void` `write_double_array(double[] val, int off, int len)` Add an IDL double array into the stream
`void` `write_double(double val)` Add an IDL double into the stream
`void` `write_fixed(java.math.BigDecimal val)` Deprecated. Loses scale and precision, see http://www.omg.org/issues/issue3431.txt
`void` `write_fixed(java.math.BigDecimal val, short digits, short scale)` Write fixed value.
`void` `write_fixed(java.math.BigDecimal val, TypeCode tc)` Write fixed value.
`void` `write_float_array(float[] val, int off, int len)` Add an IDL float array into the stream
`void` `write_float(float val)` Add an IDL float into the stream
`void` `write_long_array(int[] val, int off, int len)` Add an IDL long array into the stream
`void` `write_long(int val)` Add an IDL long into the stream
`void` `write_longlong_array(long[] val, int off, int len)` Add an IDL long long array into the stream
`void` `write_longlong(long val)` Add an IDL long long into the stream
`void` `write_Object(Object val)` Add an CORBA Object reference to the stream.
`void` `write_octet_array(byte[] val, int off, int len)` Add an IDL octet array into the stream
`void` `write_octet(byte val)` Add an IDL octet into the stream
`void` `write_Principal(Principal val)` Write principal.
`void` `write_short_array(short[] val, int off, int len)` Add an IDL short array
`void` `write_short(short val)` Add an IDL short into the stream
`void` `write_string(java.lang.String val)` Add an IDL string into the stream
`void` `write_TypeCode(TypeCode val)` Add an CORBA TypeCode to the stream.
`void` `write_ulong_array(int[] val, int off, int len)` Add an IDL unsigned long array into the stream
`void` `write_ulong(int val)` Add a IDL unsigned long into the stream
`void` `write_ulonglong_array(long[] val, int off, int len)` Add an IDL unsigned long long array into the stream
`void` `write_ulonglong(long val)` Add an IDL unsigned long long into the stream
`void` `write_ushort_array(short[] val, int offset, int length)` Add an IDL unsigned short array into the stream
`void` `write_ushort(short val)` Add an IDL unsigned short into the stream
`void` `write_value(java.io.Serializable value)` Write a value to a CDR stream
`void` `write_value(java.io.Serializable value, BoxedValueHelper boxhelp)` Write a value from a CDR stream
`void` `write_value(java.io.Serializable value, java.lang.Class clz)` Write a value to a CDR stream
`void` `write_value(java.io.Serializable value, java.lang.String arg_repo_id)` Write a value from a CDR stream
`void` `write_wchar_array(char[] val, int off, int len)` Add an IDL wide char array
`void` `write_wchar(char val)` Add an IDL wide char into the stream
`void` `write_wstring(java.lang.String val)` Add an IDL wstring into the stream
`void` `write(byte[] buf)` Write a buffer into the stream
`void` `write(byte[] buf, int off, int len)` Write a buffer into the stream
`void` `write(int val)` Write a simple value

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CDROutputStream

    public CDROutputStream(ORB orb,
                           Version version,
                           MarshalBuffer buf)

  Constructor used by message level, fragments may be sent as elements are appended to the stream, so create_input_stream is disallowed. Extending classes must implement a constructor with this exact signature.

Method Detail

### enableLogging

    public void enableLogging(org.apache.avalon.framework.logger.Logger logger)

  Specified by:
    `enableLogging` in interface `org.apache.avalon.framework.logger.LogEnabled`

### setCodesets

    public void setCodesets(int tcsc,
                            int tcsw)

### orb

    public ORB orb()

  Get the orb associated with the stream.
  Specified by:
    `orb` in interface `ExtendedOutputStream`
  Overrides:
    `orb` in class `OutputStream`

### version

    public Version version()

  Return the CDR protocol version

### alignment

    public void alignment(int align)

  Set alignment into the buffer

### pending_alignment

    public void pending_alignment(int align)

  The next call to align will result in aligning to the specified boundary if the reuested alignment is smaller.

### index

    public int index()

  Current index into the buffer.

### begin_encapsulation

    public void begin_encapsulation()

  Begin an encapsulated block. This must be paired with an end_encapsulation later in the buffer.

### end_encapsulation

    public void end_encapsulation()

  End an encapsulated block.

### write

    public void write(int val)

  Write a simple value
  Overrides:
    `write` in class `OutputStream`

### write

    public void write(byte[] buf)

  Write a buffer into the stream
  Overrides:
    `write` in class `java.io.OutputStream`

### write

    public void write(byte[] buf,
                      int off,
                      int len)

  Write a buffer into the stream
  Overrides:
    `write` in class `java.io.OutputStream`

### close

    public void close()

  Complete marshaling a message. Once this is called the message will be sent.
  Overrides:
    `close` in class `java.io.OutputStream`

### flush

    public void flush()

  Does nothing.
  Overrides:
    `flush` in class `java.io.OutputStream`

### create_input_stream

    public InputStream create_input_stream()

  This operation is not implemented. Use the `ListOutputStream` class if typed streaming is required or read fragments from an underlying marshal buffer for byte oriented data.
  Overrides:
    `create_input_stream` in class `OutputStream`

### write_boolean

    public void write_boolean(boolean val)

  Append boolean value
  Overrides:
    `write_boolean` in class `OutputStream`

### write_octet

    public void write_octet(byte val)

  Add an IDL octet into the stream
  Overrides:
    `write_octet` in class `OutputStream`

### write_char

    public void write_char(char val)

  Add an IDL char into the steam.
  Overrides:
    `write_char` in class `OutputStream`

### write_wchar

    public void write_wchar(char val)

  Add an IDL wide char into the stream
  Overrides:
    `write_wchar` in class `OutputStream`

### write_short

    public void write_short(short val)

  Add an IDL short into the stream
  Overrides:
    `write_short` in class `OutputStream`

### write_ushort

    public void write_ushort(short val)

  Add an IDL unsigned short into the stream
  Overrides:
    `write_ushort` in class `OutputStream`

### write_long

    public void write_long(int val)

  Add an IDL long into the stream
  Overrides:
    `write_long` in class `OutputStream`

### write_ulong

    public void write_ulong(int val)

  Add a IDL unsigned long into the stream
  Overrides:
    `write_ulong` in class `OutputStream`

### write_longlong

    public void write_longlong(long val)

  Add an IDL long long into the stream
  Overrides:
    `write_longlong` in class `OutputStream`

### write_ulonglong

    public void write_ulonglong(long val)

  Add an IDL unsigned long long into the stream
  Overrides:
    `write_ulonglong` in class `OutputStream`

### write_float

    public void write_float(float val)

  Add an IDL float into the stream
  Overrides:
    `write_float` in class `OutputStream`

### write_double

    public void write_double(double val)

  Add an IDL double into the stream
  Overrides:
    `write_double` in class `OutputStream`

### write_string

    public void write_string(java.lang.String val)

  Add an IDL string into the stream
  Overrides:
    `write_string` in class `OutputStream`

### write_wstring

    public void write_wstring(java.lang.String val)

  Add an IDL wstring into the stream
  Overrides:
    `write_wstring` in class `OutputStream`

### write_boolean_array

    public void write_boolean_array(boolean[] val,
                                    int off,
                                    int len)

  Write an array of boolean values.
  Overrides:
    `write_boolean_array` in class `OutputStream`

### write_char_array

    public void write_char_array(char[] val,
                                 int off,
                                 int len)

  Write an array of char values.
  Overrides:
    `write_char_array` in class `OutputStream`

### write_wchar_array

    public void write_wchar_array(char[] val,
                                  int off,
                                  int len)

  Add an IDL wide char array
  Overrides:
    `write_wchar_array` in class `OutputStream`

### write_octet_array

    public void write_octet_array(byte[] val,
                                  int off,
                                  int len)

  Add an IDL octet array into the stream
  Overrides:
    `write_octet_array` in class `OutputStream`

### write_short_array

    public void write_short_array(short[] val,
                                  int off,
                                  int len)

  Add an IDL short array
  Overrides:
    `write_short_array` in class `OutputStream`

### write_ushort_array

    public void write_ushort_array(short[] val,
                                   int offset,
                                   int length)

  Add an IDL unsigned short array into the stream
  Overrides:
    `write_ushort_array` in class `OutputStream`

### write_long_array

    public void write_long_array(int[] val,
                                 int off,
                                 int len)

  Add an IDL long array into the stream
  Overrides:
    `write_long_array` in class `OutputStream`

### write_ulong_array

    public void write_ulong_array(int[] val,
                                  int off,
                                  int len)

  Add an IDL unsigned long array into the stream
  Overrides:
    `write_ulong_array` in class `OutputStream`

### write_longlong_array

    public void write_longlong_array(long[] val,
                                     int off,
                                     int len)

  Add an IDL long long array into the stream
  Overrides:
    `write_longlong_array` in class `OutputStream`

### write_ulonglong_array

    public void write_ulonglong_array(long[] val,
                                      int off,
                                      int len)

  Add an IDL unsigned long long array into the stream
  Overrides:
    `write_ulonglong_array` in class `OutputStream`

### write_float_array

    public void write_float_array(float[] val,
                                  int off,
                                  int len)

  Add an IDL float array into the stream
  Overrides:
    `write_float_array` in class `OutputStream`

### write_double_array

    public void write_double_array(double[] val,
                                   int off,
                                   int len)

  Add an IDL double array into the stream
  Overrides:
    `write_double_array` in class `OutputStream`

### write_Object

    public void write_Object(Object val)

  Add an CORBA Object reference to the stream.
  Overrides:
    `write_Object` in class `OutputStream`

### write_TypeCode

    public void write_TypeCode(TypeCode val)

  Add an CORBA TypeCode to the stream.
  Overrides:
    `write_TypeCode` in class `OutputStream`

### write_any

    public void write_any(Any val)

  Add an CORBA any to the stream.
  Overrides:
    `write_any` in class `OutputStream`

### write_Principal

    public void write_Principal(Principal val)

  Write principal.
  Overrides:
    `write_Principal` in class `OutputStream`

### write_fixed

    public void write_fixed(java.math.BigDecimal val)

  Deprecated. Loses scale and precision, see http://www.omg.org/issues/issue3431.txt

  Write fixed value.
  Overrides:
    `write_fixed` in class `OutputStream`

### write_fixed

    public void write_fixed(java.math.BigDecimal val,
                            TypeCode tc)

  Write fixed value.
  Specified by:
    `write_fixed` in interface `ExtendedOutputStream`

### write_fixed

    public void write_fixed(java.math.BigDecimal val,
                            short digits,
                            short scale)

  Write fixed value.
  Specified by:
    `write_fixed` in interface `ExtendedOutputStream`
  Overrides:
    `write_fixed` in class `OutputStream`

### write_Context

    public void write_Context(Context ctx,
                              ContextList contexts)

  Write operation context list. Note that context use should be avoided.
  Overrides:
    `write_Context` in class `OutputStream`

### write_value

    public void write_value(java.io.Serializable value)

  Write a value to a CDR stream
  Overrides:
    `write_value` in class `OutputStream`

### write_value

    public void write_value(java.io.Serializable value,
                            java.lang.String arg_repo_id)

  Write a value from a CDR stream
  Overrides:
    `write_value` in class `OutputStream`

### write_value

    public void write_value(java.io.Serializable value,
                            java.lang.Class clz)

  Write a value to a CDR stream
  Overrides:
    `write_value` in class `OutputStream`

### write_value

    public void write_value(java.io.Serializable value,
                            BoxedValueHelper boxhelp)

  Write a value from a CDR stream
  Overrides:
    `write_value` in class `OutputStream`

### write_abstract_interface

    public void write_abstract_interface(java.lang.Object obj)

  Write an abstract interface
  Overrides:
    `write_abstract_interface` in class `OutputStream`