Package com.sun.corba.ee.impl.encoding
Class CDRInputObject
- java.lang.Object
-
- java.io.InputStream
-
- org.omg.CORBA.portable.InputStream
-
- org.omg.CORBA_2_3.portable.InputStream
-
- com.sun.corba.ee.impl.encoding.CDRInputObject
-
- All Implemented Interfaces:
MarshalInputStream
,java.io.Closeable
,java.io.Serializable
,java.lang.AutoCloseable
,DataInputStream
,IDLEntity
,ValueBase
,ValueInputStream
- Direct Known Subclasses:
EncapsInputStream
public class CDRInputObject extends InputStream implements MarshalInputStream, DataInputStream, ValueInputStream
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
CDRInputObject.InputStreamFactory
-
Field Summary
Fields Modifier and Type Field Description private Connection
corbaConnection
private Message
header
private CDRInputStreamBase
impl
protected MessageMediator
messageMediator
private static OMGSystemException
omgWrapper
private ORB
orb
private static long
serialVersionUID
private boolean
unmarshaledHeader
private static ORBUtilSystemException
wrapper
-
Constructor Summary
Constructors Modifier Constructor Description CDRInputObject()
CDRInputObject(CDRInputObject is)
CDRInputObject(ORB orb, Connection corbaConnection, java.nio.ByteBuffer byteBuffer, Message header)
protected
CDRInputObject(ORB orb, java.nio.ByteBuffer byteBuffer, int size, java.nio.ByteOrder byteOrder, GIOPVersion version, BufferManagerRead bufMgr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
_truncatable_ids()
Provides truncatable repository ids.void
addFragment(FragmentMessage header, java.nio.ByteBuffer byteBuffer)
void
alignOnBoundary(int octetBoundary)
Aligns the current position on the given octet boundary if there are enough bytes available to do so.int
available()
void
cancelProcessing(int requestId)
void
close()
void
consumeEndian()
private static BufferManagerRead
createBufferManagerRead(ORB orb, Message header)
private void
createCDRInputStream(GIOPVersion version, java.nio.ByteBuffer byteBuffer, int size, java.nio.ByteOrder byteOrder, BufferManagerRead bufMgr)
protected CodeSetConversion.BTCConverter
createCharBTCConverter()
Override the default CDR factory behavior to get the negotiated code sets from the connection.protected CodeSetConversion.BTCConverter
createWCharBTCConverter()
protected void
dprint(java.lang.String msg)
CDRInputObject
dup()
void
end_value()
The end_value method reads the end tag for the nested custom valuetype (after skipping any data that precedes the end tag) and decrements the valuetype nesting depth.int
getBufferLength()
BufferManagerRead
getBufferManager()
java.nio.ByteOrder
getByteOrder()
CodeBase
getCodeBase()
private CodeSetComponentInfo.CodeSetContext
getCodeSets()
Connection
getConnection()
GIOPVersion
getGIOPVersion()
Message
getMessageHeader()
MessageMediator
getMessageMediator()
int
getPosition()
void
mark(int readlimit)
boolean
markSupported()
ORB
orb()
Returns the ORB that created this InputStream.void
orb(ORB orb)
void
performORBVersionSpecificInit()
This must be called after determining the proper ORB version, and setting it on the stream's ORB instance.int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
java.lang.Object
read_Abstract()
Reads an IDL Abstract interface from the input stream.java.lang.Object
read_abstract_interface()
Unmarshal the value object or a suitable stub object.java.lang.Object
read_abstract_interface(java.lang.Class clz)
Unmarshal the class object or the stub class corresponding to the passed type.Any
read_any()
Reads an Any from this input stream.void
read_any_array(AnySeqHolder seq, int offset, int length)
Reads array of IDL Anys from offset for length elements from the input stream.boolean
read_boolean()
Reads a boolean value from this input stream.void
read_boolean_array(boolean[] value, int offset, int length)
Reads an array of booleans from this input stream.void
read_boolean_array(BooleanSeqHolder seq, int offset, int length)
Reads array of IDL booleans from offset for length elements from the input stream.char
read_char()
Reads a char value from this input stream.void
read_char_array(char[] value, int offset, int length)
Reads an array of chars from this input stream.void
read_char_array(CharSeqHolder seq, int offset, int length)
Reads array of IDL characters from offset for length elements from the input stream.Context
read_Context()
Reads a CORBA context from the stream.double
read_double()
Reads a double value from this input stream.void
read_double_array(double[] value, int offset, int length)
Reads an array of boubles from this input stream.void
read_double_array(DoubleSeqHolder seq, int offset, int length)
Reads array of IDL doubles from offset for length elements from the input stream.java.math.BigDecimal
read_fixed()
Reads a BigDecimal number.java.math.BigDecimal
read_fixed(short digits, short scale)
float
read_float()
Reads a float value from this input stream.void
read_float_array(float[] value, int offset, int length)
Reads an array of floats from this input stream.void
read_float_array(FloatSeqHolder seq, int offset, int length)
Reads array of IDL floats from offset for length elements from the input stream.int
read_long()
Reads a CORBA long (that is, Java int) value from this input stream.void
read_long_array(int[] value, int offset, int length)
Reads an array of CORBA longs (that is, Java ints) from this input stream.void
read_long_array(LongSeqHolder seq, int offset, int length)
Reads array of IDL longs from offset for length elements from the input stream.long
read_longlong()
Reads a CORBA longlong (that is, Java long) value from this input stream.void
read_longlong_array(long[] value, int offset, int length)
Reads an array of CORBA longlongs (that is, Java longs) from this input stream.void
read_longlong_array(LongLongSeqHolder seq, int offset, int length)
Reads array of IDL long longs from offset for length elements from the input stream.Object
read_Object()
Reads a CORBA object from this input stream.Object
read_Object(java.lang.Class clz)
Unmarshals an object and returns a CORBA Object, which is an instance of the class passed as its argument.byte
read_octet()
Reads an octet (that is, a byte) value from this input stream.void
read_octet_array(byte[] value, int offset, int length)
Reads an array of octets (that is, bytes) from this input stream.void
read_octet_array(OctetSeqHolder seq, int offset, int length)
Reads array of IDL octets from offset for length elements from the input stream.Principal
read_Principal()
Returns principle for invocation.short
read_short()
Reads a short value from this input stream.void
read_short_array(short[] value, int offset, int length)
Reads an array of shorts from this input stream.void
read_short_array(ShortSeqHolder seq, int offset, int length)
Reads array of IDL shorts from offset for length elements from the input stream.java.lang.String
read_string()
Reads a string value from this input stream.TypeCode
read_TypeCode()
Reads a TypeCode from this input stream.int
read_ulong()
Reads an unsigned CORBA long (that is, Java int) value from this input stream.void
read_ulong_array(int[] value, int offset, int length)
Reads an array of unsigned CORBA longs (that is, Java ints) from this input stream.void
read_ulong_array(ULongSeqHolder seq, int offset, int length)
Reads array of IDL unsigned longs from offset for length elements from the input stream.long
read_ulonglong()
Reads a CORBA unsigned longlong (that is, Java long) value from this input stream.void
read_ulonglong_array(long[] value, int offset, int length)
Reads an array of unsigned CORBA longlongs (that is, Java longs) from this input stream.void
read_ulonglong_array(ULongLongSeqHolder seq, int offset, int length)
Reads array of IDL unsigned long longs from offset for length elements from the input stream.short
read_ushort()
Reads a unsigned short value from this input stream.void
read_ushort_array(short[] value, int offset, int length)
Reads an array of unsigned shorts from this input stream.void
read_ushort_array(UShortSeqHolder seq, int offset, int length)
Reads array of IDL unsigned shorts from offset for length elements from the input stream.java.io.Serializable
read_value()
Unmarshalls a value type from the input stream.java.io.Serializable
read_value(java.io.Serializable value)
Unmarshalls a value type from the input stream.java.io.Serializable
read_value(java.lang.Class clz)
Unmarshalls a value type from the input stream.java.io.Serializable
read_value(java.lang.String rep_id)
Unmarshalls a value type from the input stream.java.io.Serializable
read_value(BoxedValueHelper factory)
Unmarshalls a value type from the input stream.java.io.Serializable
read_Value()
Reads an IDL value type from the input stream.char
read_wchar()
Reads a wide char value from this input stream.void
read_wchar_array(char[] value, int offset, int length)
Reads an array of wide chars from this input stream.void
read_wchar_array(WCharSeqHolder seq, int offset, int length)
Reads array of IDL wide characters from offset for length elements from the input stream.java.lang.String
read_wstring()
Reads a wide string value from this input stream.private void
readObject(java.io.ObjectInputStream is)
void
reset()
void
resetCodeSetConverters()
Resets any internal references to code set converters.protected void
setBufferLength(int value)
void
setHeaderPadding(boolean headerPadding)
protected void
setIndex(int value)
void
setMessageMediator(MessageMediator messageMediator)
long
skip(long n)
void
start_value()
The start_value method reads a valuetype header for a nested custom valuetype and increments the valuetype nesting depth.protected static java.nio.ByteOrder
toByteOrder(boolean littleEndian)
void
unmarshalHeader()
Unmarshal the extended GIOP header NOTE: May be fragmented, so should not be called by the ReaderThread.private void
unmarshalledHeader(Message msg)
-
-
-
Field Detail
-
wrapper
private static final ORBUtilSystemException wrapper
-
omgWrapper
private static final OMGSystemException omgWrapper
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
orb
private transient ORB orb
-
impl
private transient CDRInputStreamBase impl
-
corbaConnection
private transient Connection corbaConnection
-
header
private transient Message header
-
messageMediator
protected transient MessageMediator messageMediator
-
unmarshaledHeader
private boolean unmarshaledHeader
-
-
Constructor Detail
-
CDRInputObject
public CDRInputObject()
-
CDRInputObject
public CDRInputObject(CDRInputObject is)
-
CDRInputObject
protected CDRInputObject(ORB orb, java.nio.ByteBuffer byteBuffer, int size, java.nio.ByteOrder byteOrder, GIOPVersion version, BufferManagerRead bufMgr)
-
CDRInputObject
public CDRInputObject(ORB orb, Connection corbaConnection, java.nio.ByteBuffer byteBuffer, Message header)
-
-
Method Detail
-
readObject
private void readObject(java.io.ObjectInputStream is) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
addFragment
public void addFragment(FragmentMessage header, java.nio.ByteBuffer byteBuffer)
-
cancelProcessing
public void cancelProcessing(int requestId)
-
createCDRInputStream
private void createCDRInputStream(GIOPVersion version, java.nio.ByteBuffer byteBuffer, int size, java.nio.ByteOrder byteOrder, BufferManagerRead bufMgr)
-
toByteOrder
protected static java.nio.ByteOrder toByteOrder(boolean littleEndian)
-
createBufferManagerRead
private static BufferManagerRead createBufferManagerRead(ORB orb, Message header)
-
getConnection
public final Connection getConnection()
-
getMessageHeader
public Message getMessageHeader()
-
unmarshalledHeader
private void unmarshalledHeader(Message msg)
-
unmarshalHeader
public void unmarshalHeader()
Unmarshal the extended GIOP header NOTE: May be fragmented, so should not be called by the ReaderThread. See CorbaResponseWaitingRoomImpl.waitForResponse. It is done there in the client thread.
-
createCharBTCConverter
protected CodeSetConversion.BTCConverter createCharBTCConverter()
Override the default CDR factory behavior to get the negotiated code sets from the connection. These are only called once per message, the first time needed. In the local case, there is no Connection, so use the local code sets.- Returns:
- The converter.
-
createWCharBTCConverter
protected CodeSetConversion.BTCConverter createWCharBTCConverter()
-
getCodeSets
private CodeSetComponentInfo.CodeSetContext getCodeSets()
-
getCodeBase
public CodeBase getCodeBase()
-
dup
public CDRInputObject dup()
-
dprint
protected void dprint(java.lang.String msg)
-
read_boolean
public final boolean read_boolean()
Description copied from class:InputStream
Reads a boolean value from this input stream.- Specified by:
read_boolean
in interfaceDataInputStream
- Specified by:
read_boolean
in interfaceMarshalInputStream
- Specified by:
read_boolean
in classInputStream
- Returns:
- the
boolean
value read from this input stream
-
read_char
public final char read_char()
Description copied from class:InputStream
Reads a char value from this input stream.- Specified by:
read_char
in interfaceDataInputStream
- Specified by:
read_char
in interfaceMarshalInputStream
- Specified by:
read_char
in classInputStream
- Returns:
- the
char
value read from this input stream
-
read_wchar
public final char read_wchar()
Description copied from class:InputStream
Reads a wide char value from this input stream.- Specified by:
read_wchar
in interfaceDataInputStream
- Specified by:
read_wchar
in interfaceMarshalInputStream
- Specified by:
read_wchar
in classInputStream
- Returns:
- the
char
value read from this input stream
-
read_octet
public final byte read_octet()
Description copied from class:InputStream
Reads an octet (that is, a byte) value from this input stream.- Specified by:
read_octet
in interfaceDataInputStream
- Specified by:
read_octet
in interfaceMarshalInputStream
- Specified by:
read_octet
in classInputStream
- Returns:
- the
byte
value read from this input stream
-
read_short
public final short read_short()
Description copied from class:InputStream
Reads a short value from this input stream.- Specified by:
read_short
in interfaceDataInputStream
- Specified by:
read_short
in interfaceMarshalInputStream
- Specified by:
read_short
in classInputStream
- Returns:
- the
short
value read from this input stream
-
read_ushort
public final short read_ushort()
Description copied from class:InputStream
Reads a unsigned short value from this input stream.- Specified by:
read_ushort
in interfaceDataInputStream
- Specified by:
read_ushort
in interfaceMarshalInputStream
- Specified by:
read_ushort
in classInputStream
- Returns:
- the
short
value read from this input stream
-
read_long
public final int read_long()
Description copied from class:InputStream
Reads a CORBA long (that is, Java int) value from this input stream.- Specified by:
read_long
in interfaceDataInputStream
- Specified by:
read_long
in interfaceMarshalInputStream
- Specified by:
read_long
in classInputStream
- Returns:
- the
int
value read from this input stream
-
read_ulong
public final int read_ulong()
Description copied from class:InputStream
Reads an unsigned CORBA long (that is, Java int) value from this input stream.- Specified by:
read_ulong
in interfaceDataInputStream
- Specified by:
read_ulong
in interfaceMarshalInputStream
- Specified by:
read_ulong
in classInputStream
- Returns:
- the
int
value read from this input stream
-
read_longlong
public final long read_longlong()
Description copied from class:InputStream
Reads a CORBA longlong (that is, Java long) value from this input stream.- Specified by:
read_longlong
in interfaceDataInputStream
- Specified by:
read_longlong
in interfaceMarshalInputStream
- Specified by:
read_longlong
in classInputStream
- Returns:
- the
long
value read from this input stream
-
read_ulonglong
public final long read_ulonglong()
Description copied from class:InputStream
Reads a CORBA unsigned longlong (that is, Java long) value from this input stream.- Specified by:
read_ulonglong
in interfaceDataInputStream
- Specified by:
read_ulonglong
in interfaceMarshalInputStream
- Specified by:
read_ulonglong
in classInputStream
- Returns:
- the
long
value read from this input stream
-
read_float
public final float read_float()
Description copied from class:InputStream
Reads a float value from this input stream.- Specified by:
read_float
in interfaceDataInputStream
- Specified by:
read_float
in interfaceMarshalInputStream
- Specified by:
read_float
in classInputStream
- Returns:
- the
float
value read from this input stream
-
read_double
public final double read_double()
Description copied from class:InputStream
Reads a double value from this input stream.- Specified by:
read_double
in interfaceDataInputStream
- Specified by:
read_double
in interfaceMarshalInputStream
- Specified by:
read_double
in classInputStream
- Returns:
- the
double
value read from this input stream
-
read_string
public final java.lang.String read_string()
Description copied from class:InputStream
Reads a string value from this input stream.- Specified by:
read_string
in interfaceDataInputStream
- Specified by:
read_string
in interfaceMarshalInputStream
- Specified by:
read_string
in classInputStream
- Returns:
- the
String
value read from this input stream
-
read_wstring
public final java.lang.String read_wstring()
Description copied from class:InputStream
Reads a wide string value from this input stream.- Specified by:
read_wstring
in interfaceDataInputStream
- Specified by:
read_wstring
in interfaceMarshalInputStream
- Specified by:
read_wstring
in classInputStream
- Returns:
- the
String
value read from this input stream
-
read_boolean_array
public final void read_boolean_array(boolean[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of booleans from this input stream.- Specified by:
read_boolean_array
in interfaceMarshalInputStream
- Specified by:
read_boolean_array
in classInputStream
- Parameters:
value
- returned array of booleans.offset
- offset on the stream.length
- length of buffer to read
-
read_char_array
public final void read_char_array(char[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of chars from this input stream.- Specified by:
read_char_array
in interfaceMarshalInputStream
- Specified by:
read_char_array
in classInputStream
- Parameters:
value
- returned array of chars.offset
- offset on the stream.length
- length of buffer to read
-
read_wchar_array
public final void read_wchar_array(char[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of wide chars from this input stream.- Specified by:
read_wchar_array
in interfaceMarshalInputStream
- Specified by:
read_wchar_array
in classInputStream
- Parameters:
value
- returned array of wide chars.offset
- offset on the stream.length
- length of buffer to read
-
read_octet_array
public final void read_octet_array(byte[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of octets (that is, bytes) from this input stream.- Specified by:
read_octet_array
in interfaceMarshalInputStream
- Specified by:
read_octet_array
in classInputStream
- Parameters:
value
- returned array of octets (that is, bytes).offset
- offset on the stream.length
- length of buffer to read
-
read_short_array
public final void read_short_array(short[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of shorts from this input stream.- Specified by:
read_short_array
in interfaceMarshalInputStream
- Specified by:
read_short_array
in classInputStream
- Parameters:
value
- returned array of shorts.offset
- offset on the stream.length
- length of buffer to read
-
read_ushort_array
public final void read_ushort_array(short[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of unsigned shorts from this input stream.- Specified by:
read_ushort_array
in interfaceMarshalInputStream
- Specified by:
read_ushort_array
in classInputStream
- Parameters:
value
- returned array of shorts.offset
- offset on the stream.length
- length of buffer to read
-
read_long_array
public final void read_long_array(int[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of CORBA longs (that is, Java ints) from this input stream.- Specified by:
read_long_array
in interfaceMarshalInputStream
- Specified by:
read_long_array
in classInputStream
- Parameters:
value
- returned array of CORBA longs (that is, Java ints).offset
- offset on the stream.length
- length of buffer to read
-
read_ulong_array
public final void read_ulong_array(int[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of unsigned CORBA longs (that is, Java ints) from this input stream.- Specified by:
read_ulong_array
in interfaceMarshalInputStream
- Specified by:
read_ulong_array
in classInputStream
- Parameters:
value
- returned array of CORBA longs (that is, Java ints).offset
- offset on the stream.length
- length of buffer to read
-
read_longlong_array
public final void read_longlong_array(long[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of CORBA longlongs (that is, Java longs) from this input stream.- Specified by:
read_longlong_array
in interfaceMarshalInputStream
- Specified by:
read_longlong_array
in classInputStream
- Parameters:
value
- returned array of CORBA longs (that is, Java longs).offset
- offset on the stream.length
- length of buffer to read
-
read_ulonglong_array
public final void read_ulonglong_array(long[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of unsigned CORBA longlongs (that is, Java longs) from this input stream.- Specified by:
read_ulonglong_array
in interfaceMarshalInputStream
- Specified by:
read_ulonglong_array
in classInputStream
- Parameters:
value
- returned array of CORBA longs (that is, Java longs).offset
- offset on the stream.length
- length of buffer to read
-
read_float_array
public final void read_float_array(float[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of floats from this input stream.- Specified by:
read_float_array
in interfaceMarshalInputStream
- Specified by:
read_float_array
in classInputStream
- Parameters:
value
- returned array of floats.offset
- offset on the stream.length
- length of buffer to read
-
read_double_array
public final void read_double_array(double[] value, int offset, int length)
Description copied from class:InputStream
Reads an array of boubles from this input stream.- Specified by:
read_double_array
in interfaceMarshalInputStream
- Specified by:
read_double_array
in classInputStream
- Parameters:
value
- returned array of doubles.offset
- offset on the stream.length
- length of buffer to read
-
read_Object
public final Object read_Object()
Description copied from class:InputStream
Reads a CORBA object from this input stream.- Specified by:
read_Object
in interfaceDataInputStream
- Specified by:
read_Object
in interfaceMarshalInputStream
- Specified by:
read_Object
in classInputStream
- Returns:
- the
Object
instance read from this input stream
-
read_TypeCode
public final TypeCode read_TypeCode()
Description copied from class:InputStream
Reads a TypeCode from this input stream.- Specified by:
read_TypeCode
in interfaceDataInputStream
- Specified by:
read_TypeCode
in interfaceMarshalInputStream
- Specified by:
read_TypeCode
in classInputStream
- Returns:
- the
TypeCode
instance read from this input stream
-
read_any
public final Any read_any()
Description copied from class:InputStream
Reads an Any from this input stream.- Specified by:
read_any
in interfaceDataInputStream
- Specified by:
read_any
in interfaceMarshalInputStream
- Specified by:
read_any
in classInputStream
- Returns:
- the
Any
instance read from this input stream
-
read_Principal
public final Principal read_Principal()
Description copied from class:InputStream
Returns principle for invocation.- Specified by:
read_Principal
in interfaceMarshalInputStream
- Overrides:
read_Principal
in classInputStream
- Returns:
- Principle for invocation
-
read
public final int read() throws java.io.IOException
- Overrides:
read
in classInputStream
- Throws:
java.io.IOException
- See Also:
portable
package comments for unimplemented features
-
read_fixed
public final java.math.BigDecimal read_fixed()
Description copied from class:InputStream
Reads a BigDecimal number.- Overrides:
read_fixed
in classInputStream
- Returns:
- a java.math.BigDecimal number
-
read_Context
public final Context read_Context()
Description copied from class:InputStream
Reads a CORBA context from the stream.- Overrides:
read_Context
in classInputStream
- Returns:
- a CORBA context
- See Also:
portable
package comments for unimplemented features
-
read_Object
public final Object read_Object(java.lang.Class clz)
Description copied from class:InputStream
Unmarshals an object and returns a CORBA Object, which is an instance of the class passed as its argument. This class is the stub class of the expected type.- Specified by:
read_Object
in interfaceMarshalInputStream
- Overrides:
read_Object
in classInputStream
- Parameters:
clz
- The Class object for the stub class which corresponds to the type that is statistically expected, or the Class object for the RMI/IDL interface type that is statistically expected.- Returns:
- an Object instance of clz read from this stream
- See Also:
portable
package comments for unimplemented features
-
orb
public final ORB orb()
Description copied from class:InputStream
Returns the ORB that created this InputStream.- Overrides:
orb
in classInputStream
- Returns:
- the
ORB
object that created this stream - See Also:
portable
package comments for unimplemented features
-
read_value
public final java.io.Serializable read_value()
Description copied from class:InputStream
Unmarshalls a value type from the input stream.- Specified by:
read_value
in interfaceMarshalInputStream
- Overrides:
read_value
in classInputStream
- Returns:
- the value type unmarshalled from the input stream
-
read_value
public final java.io.Serializable read_value(java.lang.Class clz)
Description copied from class:InputStream
Unmarshalls a value type from the input stream.- Overrides:
read_value
in classInputStream
- Parameters:
clz
- is the declared type of the value to be unmarshalled- Returns:
- the value unmarshalled from the input stream
-
read_value
public final java.io.Serializable read_value(BoxedValueHelper factory)
Description copied from class:InputStream
Unmarshalls a value type from the input stream.- Overrides:
read_value
in classInputStream
- Parameters:
factory
- is the instance fo the helper to be used for unmarshalling the value type- Returns:
- the value unmarshalled from the input stream
-
read_value
public final java.io.Serializable read_value(java.lang.String rep_id)
Description copied from class:InputStream
Unmarshalls a value type from the input stream.- Overrides:
read_value
in classInputStream
- Parameters:
rep_id
- identifies the type of the value to be unmarshalled- Returns:
- value type unmarshalled from the input stream
-
read_value
public final java.io.Serializable read_value(java.io.Serializable value)
Description copied from class:InputStream
Unmarshalls a value type from the input stream.- Overrides:
read_value
in classInputStream
- Parameters:
value
- is an uninitialized value which is added to the orb's indirection table before calling Streamable._read() or CustomMarshal.unmarshal() to unmarshal the value.- Returns:
- value type unmarshalled from the input stream
-
read_abstract_interface
public final java.lang.Object read_abstract_interface()
Description copied from class:InputStream
Unmarshal the value object or a suitable stub object.- Overrides:
read_abstract_interface
in classInputStream
- Returns:
- ORB runtime returns the value object or a suitable stub object.
-
read_abstract_interface
public final java.lang.Object read_abstract_interface(java.lang.Class clz)
Description copied from class:InputStream
Unmarshal the class object or the stub class corresponding to the passed type.- Overrides:
read_abstract_interface
in classInputStream
- Parameters:
clz
- is the Class object for the stub class which corresponds to the type that is statically expected.- Returns:
- ORB runtime returns the value object or a suitable stub object.
-
consumeEndian
public final void consumeEndian()
- Specified by:
consumeEndian
in interfaceMarshalInputStream
-
getPosition
public final int getPosition()
- Specified by:
getPosition
in interfaceMarshalInputStream
-
read_Abstract
public final java.lang.Object read_Abstract()
Description copied from interface:DataInputStream
Reads an IDL Abstract interface from the input stream.- Specified by:
read_Abstract
in interfaceDataInputStream
- Returns:
- the Abstract interface read.
-
read_Value
public final java.io.Serializable read_Value()
Description copied from interface:DataInputStream
Reads an IDL value type from the input stream.- Specified by:
read_Value
in interfaceDataInputStream
- Returns:
- the value type read.
-
read_any_array
public final void read_any_array(AnySeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL Anys from offset for length elements from the input stream.- Specified by:
read_any_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_boolean_array
public final void read_boolean_array(BooleanSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL booleans from offset for length elements from the input stream.- Specified by:
read_boolean_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_char_array
public final void read_char_array(CharSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL characters from offset for length elements from the input stream.- Specified by:
read_char_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_wchar_array
public final void read_wchar_array(WCharSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL wide characters from offset for length elements from the input stream.- Specified by:
read_wchar_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_octet_array
public final void read_octet_array(OctetSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL octets from offset for length elements from the input stream.- Specified by:
read_octet_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_short_array
public final void read_short_array(ShortSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL shorts from offset for length elements from the input stream.- Specified by:
read_short_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_ushort_array
public final void read_ushort_array(UShortSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL unsigned shorts from offset for length elements from the input stream.- Specified by:
read_ushort_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_long_array
public final void read_long_array(LongSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL longs from offset for length elements from the input stream.- Specified by:
read_long_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_ulong_array
public final void read_ulong_array(ULongSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL unsigned longs from offset for length elements from the input stream.- Specified by:
read_ulong_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_ulonglong_array
public final void read_ulonglong_array(ULongLongSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL unsigned long longs from offset for length elements from the input stream.- Specified by:
read_ulonglong_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_longlong_array
public final void read_longlong_array(LongLongSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL long longs from offset for length elements from the input stream.- Specified by:
read_longlong_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_float_array
public final void read_float_array(FloatSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL floats from offset for length elements from the input stream.- Specified by:
read_float_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
read_double_array
public final void read_double_array(DoubleSeqHolder seq, int offset, int length)
Description copied from interface:DataInputStream
Reads array of IDL doubles from offset for length elements from the input stream.- Specified by:
read_double_array
in interfaceDataInputStream
- Parameters:
seq
- The out parameter holder for the array to be read.offset
- The index into seq of the first element to read from the input stream.length
- The number of elements to read from the input stream.
-
_truncatable_ids
public final java.lang.String[] _truncatable_ids()
Description copied from interface:ValueBase
Provides truncatable repository ids.- Specified by:
_truncatable_ids
in interfaceValueBase
- Returns:
- a String array--list of truncatable repository ids.
-
read
public final int read(byte[] b) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public final int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
skip
public final long skip(long n) throws java.io.IOException
- Overrides:
skip
in classjava.io.InputStream
- Throws:
java.io.IOException
-
available
public final int available() throws java.io.IOException
- Overrides:
available
in classjava.io.InputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-
mark
public final void mark(int readlimit)
- Specified by:
mark
in interfaceMarshalInputStream
- Overrides:
mark
in classjava.io.InputStream
-
reset
public final void reset()
- Specified by:
reset
in interfaceMarshalInputStream
- Overrides:
reset
in classjava.io.InputStream
-
markSupported
public final boolean markSupported()
- Overrides:
markSupported
in classjava.io.InputStream
-
read_fixed
public final java.math.BigDecimal read_fixed(short digits, short scale)
-
getByteOrder
public final java.nio.ByteOrder getByteOrder()
-
getBufferLength
public final int getBufferLength()
-
setBufferLength
protected final void setBufferLength(int value)
-
setIndex
protected final void setIndex(int value)
-
orb
public final void orb(ORB orb)
-
getGIOPVersion
public final GIOPVersion getGIOPVersion()
-
getBufferManager
public final BufferManagerRead getBufferManager()
-
alignOnBoundary
public void alignOnBoundary(int octetBoundary)
Aligns the current position on the given octet boundary if there are enough bytes available to do so. Otherwise, it just returns. This is used for some (but not all) GIOP 1.2 message headers.- Parameters:
octetBoundary
- alignment boundary.
-
setHeaderPadding
public void setHeaderPadding(boolean headerPadding)
-
performORBVersionSpecificInit
public void performORBVersionSpecificInit()
This must be called after determining the proper ORB version, and setting it on the stream's ORB instance. It can be called after reading the service contexts, since that is the only place we can get the ORB version info. Trying to unmarshal things requiring repository IDs before calling this will result in NullPtrExceptions.- Specified by:
performORBVersionSpecificInit
in interfaceMarshalInputStream
-
resetCodeSetConverters
public void resetCodeSetConverters()
Resets any internal references to code set converters. This is useful for forcing the CDR stream to reacquire converters (probably from its subclasses) when state has changed.- Specified by:
resetCodeSetConverters
in interfaceMarshalInputStream
-
setMessageMediator
public void setMessageMediator(MessageMediator messageMediator)
-
getMessageMediator
public MessageMediator getMessageMediator()
-
start_value
public void start_value()
Description copied from interface:ValueInputStream
The start_value method reads a valuetype header for a nested custom valuetype and increments the valuetype nesting depth.- Specified by:
start_value
in interfaceValueInputStream
-
end_value
public void end_value()
Description copied from interface:ValueInputStream
The end_value method reads the end tag for the nested custom valuetype (after skipping any data that precedes the end tag) and decrements the valuetype nesting depth.- Specified by:
end_value
in interfaceValueInputStream
-
-