public class CDRInputStream extends InputStream implements CodeSet.InputBuffer, ValueInputStream
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
buffer
indices into the actual buffer
|
protected int |
giop_minor |
protected int |
index |
protected int |
pos |
| Constructor and Description |
|---|
CDRInputStream(byte[] buffer) |
CDRInputStream(ORB orb,
byte[] buf) |
CDRInputStream(ORB orb,
byte[] buf,
boolean littleEndian) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
void |
closeEncapsulation()
close a CDR encapsulation and
restore index and byte order information
|
void |
end_value()
end_value implements ValueInputStream JavaToIDL mapping 02-01-12. |
int |
get_pos()
Returns the current position in the buffer.
|
byte[] |
getBufferCopy() |
int |
getGIOPMinor() |
String |
getIndentString()
used for debug/informational output
|
protected boolean |
getLittleEndian() |
void |
mark(int readLimit) |
boolean |
markSupported() |
void |
openEncapsulatedArray() |
int |
openEncapsulation()
open a CDR encapsulation and
restore index and byte order information
|
ORB |
orb() |
Object |
read_abstract_interface()
Reads an abstract interface from this stream.
|
Object |
read_abstract_interface(Class clazz)
Reads an abstract interface from this stream.
|
Any |
read_any() |
void |
read_boolean_array(boolean[] value,
int offset,
int length)
arrays
|
boolean |
read_boolean() |
void |
read_char_array(char[] value,
int offset,
int length)
read_char_array reads an character array from the stream. |
char |
read_char()
read_char reads a character from the stream. |
void |
read_double_array(double[] value,
int offset,
int length) |
double |
read_double() |
BigDecimal |
read_fixed()
Deprecated.
use
read_fixed(short, short) instead |
BigDecimal |
read_fixed(short digits,
short scale) |
void |
read_float_array(float[] value,
int offset,
int length) |
float |
read_float() |
void |
read_long_array(int[] value,
int offset,
int length) |
int |
read_long() |
void |
read_longlong_array(long[] value,
int offset,
int length) |
long |
read_longlong() |
Object |
read_Object() |
Object |
read_Object(Class clazz) |
void |
read_octet_array(byte[] value,
int offset,
int length) |
byte |
read_octet() |
Principal |
read_Principal() |
void |
read_short_array(short[] value,
int offset,
int length) |
short |
read_short() |
String |
read_string()
read_string reads a string from the buffer. |
TypeCode |
read_TypeCode() |
TypeCode |
read_TypeCode(Map recursiveTCMap,
Map repeatedTCMap) |
void |
read_ulong_array(int[] value,
int offset,
int length) |
int |
read_ulong() |
void |
read_ulonglong_array(long[] value,
int offset,
int length) |
long |
read_ulonglong() |
void |
read_ushort_array(short[] value,
int offset,
int length) |
short |
read_ushort() |
Serializable |
read_value() |
Serializable |
read_value(BoxedValueHelper factory)
Overrides read_value(factory) in
org.omg.CORBA_2_3.portable.InputStream
|
Serializable |
read_value(Class clz)
Overrides read_value(clz) in
org.omg.CORBA_2_3.portable.InputStream
|
Serializable |
read_value(Serializable value)
Unmarshals a valuetype instance from this stream.
|
Serializable |
read_value(String rep_id)
Overrides read_value(java.io.Serializable value) in
org.omg.CORBA_2_3.portable.InputStream
|
void |
read_wchar_array(char[] value,
int offset,
int length) |
char |
read_wchar() |
String |
read_wstring() |
int |
read()
Reads the next byte of data from the input stream.
|
int |
read(byte[] b)
Has the effect of read(b, 0, b.length);
|
int |
read(byte[] b,
int off,
int len)
Performs as described by
java.io.InputStream.read(byte[], int, int),
but never blocks. |
boolean |
readBOM()
Read the byte order marker indicating the endianess.
|
byte |
readByte()
Reads the next byte from an in-memory buffer.
|
TypeCode |
readTypeCodeCache(String repositoryID,
Integer startPosition)
try to locate a TypeCode identified by its repository id in the TypeCodeCache.
|
void |
register_value(Serializable value)
Stores `value' into this stream's valueMap.
|
void |
reset() |
void |
setCodeSet(CodeSet codeSet,
CodeSet codeSetWide) |
void |
setGIOPMinor(int giop_minor) |
void |
setLittleEndian(boolean b) |
void |
skip(int distance) |
void |
skipRemainingTypeCode(Integer start_pos,
int size)
Skip amount is
skip (size - ((pos - start_pos) - 4 - 4));
EncapsulationSize -
( PositionAfterReadingId - start_pos
- 4 [Size] - 4 [KindSize] ) = RemainingSizeToSkip
|
void |
start_value()
start_value implements ValueInputStream JavaToIDL mapping 02-01-12. |
void |
updateMutatorConnection(GIOPConnection connection)
updateMutatorConnection is an accessor that updates the
ior mutator. |
void |
updateTypeCodeCache(String repositoryID,
Integer startPosition,
int size)
update the TypeCodeCache with the contents of the current repeatedTCMap using the
entries between startPosition and (startPosition + size).
|
read_Contextskipprotected int giop_minor
protected byte[] buffer
protected int pos
protected int index
public CDRInputStream(byte[] buffer)
public CDRInputStream(ORB orb, byte[] buf)
public CDRInputStream(ORB orb, byte[] buf, boolean littleEndian)
public void setGIOPMinor(int giop_minor)
public int getGIOPMinor()
public void close()
close in interface Closeableclose in interface AutoCloseableclose in class InputStreampublic ORB orb()
orb in class InputStreampublic final void skip(int distance)
public final void closeEncapsulation()
public final int openEncapsulation()
public final void openEncapsulatedArray()
public byte[] getBufferCopy()
public int read()
throws IOException
int in the range 0 to
255. If no byte is available because the end of the stream
has been reached, the value -1 is returned.read in class InputStream-1 if the end of the
stream is reached.IOException - if stream is closed.public int available()
available in class InputStreampublic int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionread(byte[], int, int)public int read(byte[] b,
int off,
int len)
throws IOException
java.io.InputStream.read(byte[], int, int),
but never blocks.read in class InputStreamIOExceptionpublic final Any read_any()
read_any in class InputStreampublic final boolean read_boolean()
read_boolean in class InputStreampublic final void read_boolean_array(boolean[] value,
int offset,
int length)
read_boolean_array in class InputStreampublic final char read_char()
read_char reads a character from the stream.read_char in class InputStreamchar valuepublic final void read_char_array(char[] value,
int offset,
int length)
read_char_array reads an character array from the stream.read_char_array in class InputStreamvalue - a char[], the result array.offset - an int, an offset into valuelength - an int, the length of the array to readpublic final double read_double()
read_double in class InputStreampublic final void read_double_array(double[] value,
int offset,
int length)
read_double_array in class InputStream@Deprecated public BigDecimal read_fixed()
read_fixed(short, short) insteadread_fixed in class InputStreampublic BigDecimal read_fixed(short digits, short scale)
public final float read_float()
read_float in class InputStreampublic final void read_float_array(float[] value,
int offset,
int length)
read_float_array in class InputStreampublic final int read_long()
read_long in class InputStreampublic final void read_long_array(int[] value,
int offset,
int length)
read_long_array in class InputStreampublic final long read_longlong()
read_longlong in class InputStreampublic final void read_longlong_array(long[] value,
int offset,
int length)
read_longlong_array in class InputStreampublic final Object read_Object()
read_Object in class InputStreampublic Object read_Object(Class clazz)
read_Object in class InputStreampublic final byte read_octet()
read_octet in class InputStreampublic final void read_octet_array(byte[] value,
int offset,
int length)
read_octet_array in class InputStreampublic final Principal read_Principal()
read_Principal in class InputStreampublic final short read_short()
read_short in class InputStreampublic final void read_short_array(short[] value,
int offset,
int length)
read_short_array in class InputStreampublic final String read_string()
read_string reads a string from the buffer. It is optimized
for whether it is reading a blank string, and whether codeset translation
is active.read_string in class InputStreamString value, possibly blank, never null.public final TypeCode read_TypeCode()
read_TypeCode in class InputStreampublic void skipRemainingTypeCode(Integer start_pos, int size)
start_pos - size - public final int read_ulong()
read_ulong in class InputStreampublic final void read_ulong_array(int[] value,
int offset,
int length)
read_ulong_array in class InputStreampublic final long read_ulonglong()
read_ulonglong in class InputStreampublic final void read_ulonglong_array(long[] value,
int offset,
int length)
read_ulonglong_array in class InputStreampublic final short read_ushort()
read_ushort in class InputStreampublic final void read_ushort_array(short[] value,
int offset,
int length)
read_ushort_array in class InputStreampublic final char read_wchar()
read_wchar in class InputStreampublic byte readByte()
CodeSet.InputBufferreadByte in interface CodeSet.InputBufferpublic final boolean readBOM()
readBOM in interface CodeSet.InputBufferpublic final void read_wchar_array(char[] value,
int offset,
int length)
read_wchar_array in class InputStreampublic final String read_wstring()
read_wstring in class InputStreampublic boolean markSupported()
markSupported in class InputStreampublic void mark(int readLimit)
mark in class InputStreampublic void reset()
throws IOException
reset in class InputStreamIOExceptionpublic final void setLittleEndian(boolean b)
protected boolean getLittleEndian()
public Serializable read_value()
read_value in class InputStreampublic Serializable read_value(String rep_id)
read_value in class InputStreampublic Serializable read_value(Serializable value)
read_value in class InputStreampublic Serializable read_value(Class clz)
read_value in class InputStreampublic Serializable read_value(BoxedValueHelper factory)
read_value in class InputStreampublic Object read_abstract_interface()
read_abstract_interface in class InputStreampublic Object read_abstract_interface(Class clazz)
read_abstract_interface in class InputStreampublic int get_pos()
CodeSet.InputBufferget_pos in interface CodeSet.InputBufferpublic void register_value(Serializable value)
public void updateMutatorConnection(GIOPConnection connection)
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.connection - an org.omg.ETF.Connection valuepublic void updateTypeCodeCache(String repositoryID, Integer startPosition, int size)
public TypeCode readTypeCodeCache(String repositoryID, Integer startPosition)
repositoryID - repository id of the TypeCode that should be looked up in the cachestartPosition - start position in the buffer of the TypeCode that should be looked up in the cachepublic String getIndentString()
public void start_value()
start_value implements ValueInputStream JavaToIDL mapping 02-01-12.
It should read a valuetype header for a nested custom valuetype and increment
the valuetype nesting depth.start_value in interface ValueInputStreampublic void end_value()
end_value implements ValueInputStream JavaToIDL mapping 02-01-12.
It should read the end tag for the nested custom valuetype (after skipping
any data that precedes the end tag) and decrements the valuetype nesting depth.end_value in interface ValueInputStreamCopyright © 2017 JacORB. All rights reserved.