All Packages Class Hierarchy This Package Previous Next Index
Class orbasec.corba.CDRDecoder
java.lang.Object
|
+----org.omg.CORBA.portable.InputStream
|
+----orbasec.corba.CDRDecoder
- public class CDRDecoder
- extends InputStream
Lightweight CDR Buffer Encoder Decoder
This is a simple class used for decoding and encoding SECIOP and GIOP
messages, without any's and type codes.
This object is used in conjunction with CDRBuffer and CDREncoder.
This object handles the endian and conversion to byte arrays. The
CDRDecoder and CDREncoder implement the CROBA portable InputStream and
InputStream respectively.
Example:
// Create a Kerberos security component.
org.omg.SECIOP.KerberosV5 krbcomp = .....;
// Get a big endian buffer and encoder
CDRBuffer buf = new CDRBuffer();
CDREncoder enc = new CDREncoder(buf);
buf.writeEndian(); // writes front enidan boolean for Big endian.
// Write the security component into the buffer.
org.omg.SECIOP.KerberosV5Helper.write(enc,krbcomp);
// Convert the buffer to a byte array.
byte[] component_data = buf.toByteArray();
For decoding:
// Get Kerberos Security Component Data
byte[] component_data = ...........;
// Get a buffer and decoder
CDRBuffer buf = new CDRBuffer(component_data,0,component_data.length);
CDRDecoder dec = new CDRDecoder(buf);
buf.readEndian(); // Reads the endian boolean at the front. Set's up
// for big or little endian based on it.
// Read the security comonent.
org.omg.SECIOP.KerberosV5 krb5 =
org.omg.SECIOP.KerberosV5Helper.read(dec);
-
CDRDecoder()
- Creates its own internal CDR Buffer, use _A_buffer() to
retrieve it.
-
CDRDecoder(CDRBuffer)
- This constructor is the most commonly used since the
buffer is the one that writes the endian desigation
and converts the data to a byte array.
-
CDRDecoder(CDREncoder)
- Used to immediately decode things encoded by an Encoder.
-
_A_buffer()
- Returns the CDRBuffer associated with this decoder.
-
read_any()
- Not implemented
-
read_boolean()
-
-
read_boolean_array(boolean[], int, int)
-
-
read_char()
-
-
read_char_array(char[], int, int)
-
-
read_double()
-
-
read_double_array(double[], int, int)
-
-
read_float()
-
-
read_float_array(float[], int, int)
-
-
read_long()
-
-
read_long_array(int[], int, int)
-
-
read_longlong()
-
-
read_longlong_array(long[], int, int)
-
-
read_Object()
- Not implemented
-
read_octet()
-
-
read_octet_array(byte[], int, int)
-
-
read_Principal()
- Not implemented
-
read_short()
-
-
read_short_array(short[], int, int)
-
-
read_string()
-
-
read_TypeCode()
- Not implemented
-
read_ulong()
-
-
read_ulong_array(int[], int, int)
-
-
read_ulonglong()
-
-
read_ulonglong_array(long[], int, int)
-
-
read_ushort()
-
-
read_ushort_array(short[], int, int)
-
-
read_wchar()
-
-
read_wchar_array(char[], int, int)
-
-
read_wstring()
-
CDRDecoder
public CDRDecoder(CDRBuffer buf)
- This constructor is the most commonly used since the
buffer is the one that writes the endian desigation
and converts the data to a byte array.
CDRDecoder
public CDRDecoder(CDREncoder enc)
- Used to immediately decode things encoded by an Encoder.
CDRDecoder
public CDRDecoder()
- Creates its own internal CDR Buffer, use _A_buffer() to
retrieve it.
_A_buffer
public CDRBuffer _A_buffer()
- Returns the CDRBuffer associated with this decoder.
read_boolean
public boolean read_boolean()
- Overrides:
- read_boolean in class InputStream
read_char
public char read_char()
- Overrides:
- read_char in class InputStream
read_wchar
public char read_wchar()
- Overrides:
- read_wchar in class InputStream
read_octet
public byte read_octet()
- Overrides:
- read_octet in class InputStream
read_short
public short read_short()
- Overrides:
- read_short in class InputStream
read_ushort
public short read_ushort()
- Overrides:
- read_ushort in class InputStream
read_long
public int read_long()
- Overrides:
- read_long in class InputStream
read_ulong
public int read_ulong()
- Overrides:
- read_ulong in class InputStream
read_longlong
public long read_longlong()
- Overrides:
- read_longlong in class InputStream
read_ulonglong
public long read_ulonglong()
- Overrides:
- read_ulonglong in class InputStream
read_float
public float read_float()
- Overrides:
- read_float in class InputStream
read_double
public double read_double()
- Overrides:
- read_double in class InputStream
read_string
public String read_string()
- Overrides:
- read_string in class InputStream
read_wstring
public String read_wstring()
- Overrides:
- read_wstring in class InputStream
read_boolean_array
public void read_boolean_array(boolean value[],
int offset,
int length)
- Overrides:
- read_boolean_array in class InputStream
read_char_array
public void read_char_array(char value[],
int offset,
int length)
- Overrides:
- read_char_array in class InputStream
read_wchar_array
public void read_wchar_array(char value[],
int offset,
int length)
- Overrides:
- read_wchar_array in class InputStream
read_octet_array
public void read_octet_array(byte value[],
int offset,
int length)
- Overrides:
- read_octet_array in class InputStream
read_short_array
public void read_short_array(short value[],
int offset,
int length)
- Overrides:
- read_short_array in class InputStream
read_ushort_array
public void read_ushort_array(short value[],
int offset,
int length)
- Overrides:
- read_ushort_array in class InputStream
read_long_array
public void read_long_array(int value[],
int offset,
int length)
- Overrides:
- read_long_array in class InputStream
read_ulong_array
public void read_ulong_array(int value[],
int offset,
int length)
- Overrides:
- read_ulong_array in class InputStream
read_longlong_array
public void read_longlong_array(long value[],
int offset,
int length)
- Overrides:
- read_longlong_array in class InputStream
read_ulonglong_array
public void read_ulonglong_array(long value[],
int offset,
int length)
- Overrides:
- read_ulonglong_array in class InputStream
read_float_array
public void read_float_array(float value[],
int offset,
int length)
- Overrides:
- read_float_array in class InputStream
read_double_array
public void read_double_array(double value[],
int offset,
int length)
- Overrides:
- read_double_array in class InputStream
read_Object
public Object read_Object()
- Not implemented
- Overrides:
- read_Object in class InputStream
read_TypeCode
public TypeCode read_TypeCode()
- Not implemented
- Overrides:
- read_TypeCode in class InputStream
read_any
public Any read_any()
- Not implemented
- Overrides:
- read_any in class InputStream
read_Principal
public Principal read_Principal()
- Not implemented
- Overrides:
- read_Principal in class InputStream
All Packages Class Hierarchy This Package Previous Next Index