## org.openorb.iiop
Class CDRInputStream

    java.lang.Object
      |
      +--java.io.InputStream
            |
            +--org.omg.CORBA.portable.InputStream
                  |
                  +--org.omg.CORBA_2_3.portable.InputStream
                        |
                        +--org.openorb.io.AbstractInputStream
                              |
                              +--org.openorb.iiop.CDRInputStream

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

public class CDRInputStream
extends AbstractInputStream
implements org.apache.avalon.framework.logger.LogEnabled

This class implements CDR for IIOP

Version:
  $Revision: 1.27.2.1 $ $Date: 2003/02/27 18:34:27 $
Author:
  Chris Wood

Constructor Summary
`CDRInputStream(ORB orb, boolean bigEndian, Version version, BufferSource source)` Constructor used by lower layer.
`CDRInputStream(ORB orb, boolean bigEndian, Version version, StorageBuffer buf)` Constructor used by codec.

Method Summary
`void` `alignment(int size)` Adjust alignment.
`void` `begin_encapsulation()` Encapsulation begin.
`boolean` `bigEndian()` Get the endian mode
`void` `bigEndian(boolean bigEndian)` Set the endian mode
`void` `enableLogging(org.apache.avalon.framework.logger.Logger logger)`
`void` `end_encapsulation()` skip to end of current encapsulation
`int` `index()` Get the current index in the buffer.
`void` `mark(int readlimit)` Set a mark at the current buffer position.
`ORB` `orb()` Get the orb associated with the stream.
`java.lang.Object` `read_abstract_interface()` Read an abstract interface
`java.lang.Object` `read_abstract_interface(java.lang.Class clz)` Read an abstract interface
`Any` `read_any()` Read an any
`void` `read_boolean_array(boolean[] val, int off, int len)` Read an IDL boolean array
`boolean` `read_boolean()` Return an IDL boolean
`void` `read_char_array(char[] val, int voff, int len)` Read an IDL char array from the stream
`char` `read_char()` Return an IDL char
`Context` `read_Context()` Read a context
`void` `read_double_array(double[] val, int off, int len)` Read a double array
`double` `read_double()` Return an IDL double
`java.math.BigDecimal` `read_fixed()` Deprecated. Loses scale and precision, see http://www.omg.org/issues/issue3431.txt
`java.math.BigDecimal` `read_fixed(short digits, short scale)` read a fixed.
`java.math.BigDecimal` `read_fixed(TypeCode type)` read a fixed.
`void` `read_float_array(float[] val, int off, int len)` Read a float array
`float` `read_float()` Return an IDL float
`void` `read_long_array(int[] val, int off, int len)` Read a long array
`int` `read_long()` Return an IDL long
`void` `read_longlong_array(long[] val, int off, int len)` Read a long long array
`long` `read_longlong()` Return an IDL long long
`Object` `read_Object()` Read an object
`Object` `read_Object(java.lang.Class clz)` Read an Object
`void` `read_octet_array(byte[] val, int off, int len)` Read an octet array
`byte` `read_octet()` Return an IDL octet
`Principal` `read_Principal()` Read a principal
`void` `read_short_array(short[] val, int off, int len)` Read a short array
`short` `read_short()` Return an IDL short
`java.lang.String` `read_string()` Return an IDL string
`TypeCode` `read_TypeCode()` Read a typecode
`java.lang.String[]` `read_typeids(int tag)`
`void` `read_ulong_array(int[] val, int off, int len)` Read an unsigned long array
`int` `read_ulong()` Return an IDL unsigned long
`void` `read_ulonglong_array(long[] val, int off, int len)` Read an unsigned long long array
`long` `read_ulonglong()` Return an IDL unsigned long long
`void` `read_ushort_array(short[] val, int off, int len)` Read an unsigned short array
`short` `read_ushort()` Return an IDL unsigned short
`java.io.Serializable` `read_value()` Read a value from a CDR stream
`java.io.Serializable` `read_value(BoxedValueHelper boxhelp)` Read a value from a CDR stream
`java.io.Serializable` `read_value(java.lang.Class clz)` Read a value from a CDR stream
`java.io.Serializable` `read_value(java.io.Serializable value)` Read value state from the stream.
`java.io.Serializable` `read_value(java.lang.String rep_id)` Read a value from a CDR stream
`void` `read_wchar_array(char[] val, int voff, int vlen)` Read a wchar array
`char` `read_wchar()` Read a wchar from the input stream.
`java.lang.String` `read_wstring()` Return an IDL wstring
`void` `reset_index()` Reset the index to 0.
`void` `reset()` Reset the current position to the latest mark.
`void` `setCodesets(int tcsc, int tcsw)` Set the translation codesets.
`long` `skip(long count)` Skip over bytes.
`Version` `version()` Get the CDR protocol version

Methods inherited from class org.openorb.io.AbstractInputStream
`available, get_codebase, markSupported, read, read, read`

Methods inherited from class java.io.InputStream
`close`

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

Constructor Detail

### CDRInputStream

    public CDRInputStream(ORB orb,
                          boolean bigEndian,
                          Version version,
                          StorageBuffer buf)

  Constructor used by codec. Extending classes must implement a constructor with this exact signature.

### CDRInputStream

    public CDRInputStream(ORB orb,
                          boolean bigEndian,
                          Version version,
                          BufferSource source)

  Constructor used by lower layer. 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`

### orb

    public ORB orb()

  Get the orb associated with the stream.
  Overrides:
    `orb` in class `InputStream`

### setCodesets

    public void setCodesets(int tcsc,
                            int tcsw)

  Set the translation codesets.

### index

    public int index()

  Get the current index in the buffer.

### reset_index

    public void reset_index()

  Reset the index to 0. This affects the alignment. Using this inside an encapsulation may cause unexpected behaviour.

### version

    public Version version()

  Get the CDR protocol version

### bigEndian

    public boolean bigEndian()

  Get the endian mode

### bigEndian

    public void bigEndian(boolean bigEndian)

  Set the endian mode

### alignment

    public void alignment(int size)

  Adjust alignment.

### begin_encapsulation

    public void begin_encapsulation()

  Encapsulation begin.

### end_encapsulation

    public void end_encapsulation()

  skip to end of current encapsulation

### skip

    public long skip(long count)

  Skip over bytes.
  Overrides:
    `skip` in class `AbstractInputStream`
  Following copied from class: `org.openorb.io.AbstractInputStream`
  Parameters:
    `count` - The number of bytes to skip.

### mark

    public void mark(int readlimit)

  Description copied from class: `AbstractInputStream`
  Set a mark at the current buffer position.
  Overrides:
    `mark` in class `AbstractInputStream`
  Following copied from class: `org.openorb.io.AbstractInputStream`
  Parameters:
    `readlimit` - NOT USED

### reset

    public void reset()
               throws java.io.IOException

  Description copied from class: `AbstractInputStream`
  Reset the current position to the latest mark.
  Overrides:
    `reset` in class `AbstractInputStream`
  Following copied from class: `org.openorb.io.AbstractInputStream`
  Throws:
    `java.io.IOException` - An IOException is thrown when there is no mark where the buffer can be reset to.

### read_boolean

    public boolean read_boolean()

  Return an IDL boolean
  Overrides:
    `read_boolean` in class `InputStream`

### read_char

    public char read_char()

  Return an IDL char
  Overrides:
    `read_char` in class `InputStream`

### read_wchar

    public char read_wchar()

  Read a wchar from the input stream.
  Overrides:
    `read_wchar` in class `InputStream`
  Returns:
    '\0' When no wchar encoder is set or the letter represented by the bytes is longer than 1.

### read_octet

    public byte read_octet()

  Return an IDL octet
  Overrides:
    `read_octet` in class `InputStream`

### read_short

    public short read_short()

  Return an IDL short
  Overrides:
    `read_short` in class `InputStream`

### read_ushort

    public short read_ushort()

  Return an IDL unsigned short
  Overrides:
    `read_ushort` in class `InputStream`

### read_long

    public int read_long()

  Return an IDL long
  Overrides:
    `read_long` in class `InputStream`

### read_ulong

    public int read_ulong()

  Return an IDL unsigned long
  Overrides:
    `read_ulong` in class `InputStream`

### read_longlong

    public long read_longlong()

  Return an IDL long long
  Overrides:
    `read_longlong` in class `InputStream`

### read_ulonglong

    public long read_ulonglong()

  Return an IDL unsigned long long
  Overrides:
    `read_ulonglong` in class `InputStream`

### read_float

    public float read_float()

  Return an IDL float
  Overrides:
    `read_float` in class `InputStream`

### read_double

    public double read_double()

  Return an IDL double
  Overrides:
    `read_double` in class `InputStream`

### read_string

    public java.lang.String read_string()

  Return an IDL string
  Overrides:
    `read_string` in class `InputStream`

### read_wstring

    public java.lang.String read_wstring()

  Return an IDL wstring
  Overrides:
    `read_wstring` in class `InputStream`

### read_boolean_array

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

  Read an IDL boolean array
  Overrides:
    `read_boolean_array` in class `InputStream`

### read_char_array

    public void read_char_array(char[] val,
                                int voff,
                                int len)

  Read an IDL char array from the stream
  Overrides:
    `read_char_array` in class `InputStream`

### read_wchar_array

    public void read_wchar_array(char[] val,
                                 int voff,
                                 int vlen)

  Read a wchar array
  Overrides:
    `read_wchar_array` in class `InputStream`

### read_octet_array

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

  Read an octet array
  Overrides:
    `read_octet_array` in class `InputStream`

### read_short_array

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

  Read a short array
  Overrides:
    `read_short_array` in class `InputStream`

### read_ushort_array

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

  Read an unsigned short array
  Overrides:
    `read_ushort_array` in class `InputStream`

### read_long_array

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

  Read a long array
  Overrides:
    `read_long_array` in class `InputStream`

### read_ulong_array

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

  Read an unsigned long array
  Overrides:
    `read_ulong_array` in class `InputStream`

### read_longlong_array

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

  Read a long long array
  Overrides:
    `read_longlong_array` in class `InputStream`

### read_ulonglong_array

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

  Read an unsigned long long array
  Overrides:
    `read_ulonglong_array` in class `InputStream`

### read_float_array

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

  Read a float array
  Overrides:
    `read_float_array` in class `InputStream`

### read_double_array

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

  Read a double array
  Overrides:
    `read_double_array` in class `InputStream`

### read_TypeCode

    public TypeCode read_TypeCode()

  Read a typecode
  Overrides:
    `read_TypeCode` in class `InputStream`

### read_any

    public Any read_any()

  Read an any
  Overrides:
    `read_any` in class `InputStream`

### read_Principal

    public Principal read_Principal()

  Read a principal
  Overrides:
    `read_Principal` in class `InputStream`

### read_Object

    public Object read_Object()

  Read an object
  Overrides:
    `read_Object` in class `InputStream`

### read_Object

    public Object read_Object(java.lang.Class clz)

  Read an Object
  Overrides:
    `read_Object` in class `InputStream`

### read_Context

    public Context read_Context()

  Read a context
  Overrides:
    `read_Context` in class `InputStream`

### read_fixed

    public java.math.BigDecimal read_fixed()

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

  Read a fixed
  Overrides:
    `read_fixed` in class `InputStream`

### read_fixed

    public java.math.BigDecimal read_fixed(TypeCode type)

  read a fixed.

### read_fixed

    public java.math.BigDecimal read_fixed(short digits,
                                           short scale)

  read a fixed.
  Overrides:
    `read_fixed` in class `InputStream`

### read_value

    public java.io.Serializable read_value()

  Read a value from a CDR stream
  Overrides:
    `read_value` in class `InputStream`

### read_value

    public java.io.Serializable read_value(java.lang.String rep_id)

  Read a value from a CDR stream
  Overrides:
    `read_value` in class `InputStream`

### read_value

    public java.io.Serializable read_value(java.lang.Class clz)

  Read a value from a CDR stream
  Overrides:
    `read_value` in class `InputStream`

### read_value

    public java.io.Serializable read_value(BoxedValueHelper boxhelp)

  Read a value from a CDR stream
  Overrides:
    `read_value` in class `InputStream`

### read_typeids

    public java.lang.String[] read_typeids(int tag)

### read_value

    public java.io.Serializable read_value(java.io.Serializable value)

  Read value state from the stream. Called externally by factories with uninitialized value. One of the other read_value functions always appears above it in the call stack.
  Overrides:
    `read_value` in class `InputStream`

### read_abstract_interface

    public java.lang.Object read_abstract_interface()

  Read an abstract interface
  Overrides:
    `read_abstract_interface` in class `InputStream`
  Returns:
    the readed object ( An CORBA.Object or a value type )

### read_abstract_interface

    public java.lang.Object read_abstract_interface(java.lang.Class clz)

  Read an abstract interface
  Overrides:
    `read_abstract_interface` in class `InputStream`
  Parameters:
    `clz` - the stub class for an object
  Returns:
    the readed object ( An CORBA.Object or a value type )