Package com.sun.corba.ee.impl.encoding
Class WrapperInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.omg.CORBA.portable.InputStream
-
- org.omg.CORBA_2_3.portable.InputStream
-
- com.sun.corba.ee.impl.encoding.WrapperInputStream
-
- All Implemented Interfaces:
MarshalInputStream
,TypeCodeReader
,java.io.Closeable
,java.lang.AutoCloseable
public class WrapperInputStream extends InputStream implements TypeCodeReader
-
-
Field Summary
Fields Modifier and Type Field Description private int
startPos
private CDRInputObject
stream
private java.util.Map<java.lang.Integer,TypeCodeImpl>
typeMap
-
Constructor Summary
Constructors Constructor Description WrapperInputStream(CDRInputObject s)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTypeCodeAtPosition(TypeCodeImpl tc, int position)
int
available()
void
close()
void
consumeEndian()
int
getPosition()
int
getTopLevelPosition()
TypeCodeReader
getTopLevelStream()
TypeCodeImpl
getTypeCodeAtPosition(int position)
void
mark(int readlimit)
boolean
markSupported()
ORB
orb()
Returns the ORB that created this InputStream.void
performORBVersionSpecificInit()
This must be called once before unmarshaling valuetypes or anything that uses repository IDs.void
printTypeMap()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
Any
read_any()
Reads an Any from this 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.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.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.java.math.BigDecimal
read_fixed()
Reads a BigDecimal number.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.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.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.Object
read_Object()
Reads a CORBA object from this input stream.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.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.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.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.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.java.io.Serializable
read_value()
Unmarshalls a 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.java.lang.String
read_wstring()
Reads a wide string value from this input stream.void
reset()
void
resetCodeSetConverters()
Tells the input stream to null any code set converter references, forcing it to reacquire them if it needs converters again.void
setEnclosingInputStream(InputStream enclosure)
long
skip(long n)
-
Methods inherited from class org.omg.CORBA_2_3.portable.InputStream
read_abstract_interface, read_abstract_interface, read_value, read_value, read_value, read_value
-
Methods inherited from class org.omg.CORBA.portable.InputStream
read_Object
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.corba.ee.impl.encoding.MarshalInputStream
read_Object
-
-
-
-
Field Detail
-
stream
private CDRInputObject stream
-
typeMap
private java.util.Map<java.lang.Integer,TypeCodeImpl> typeMap
-
startPos
private int startPos
-
-
Constructor Detail
-
WrapperInputStream
public WrapperInputStream(CDRInputObject s)
-
-
Method Detail
-
read
public int read() throws java.io.IOException
- Overrides:
read
in classInputStream
- Throws:
java.io.IOException
- See Also:
portable
package comments for unimplemented features
-
read
public int read(byte[] b) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException
- Overrides:
skip
in classjava.io.InputStream
- Throws:
java.io.IOException
-
available
public 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 void mark(int readlimit)
- Specified by:
mark
in interfaceMarshalInputStream
- Overrides:
mark
in classjava.io.InputStream
-
reset
public void reset()
- Specified by:
reset
in interfaceMarshalInputStream
- Overrides:
reset
in classjava.io.InputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classjava.io.InputStream
-
getPosition
public int getPosition()
- Specified by:
getPosition
in interfaceMarshalInputStream
- Specified by:
getPosition
in interfaceTypeCodeReader
-
consumeEndian
public void consumeEndian()
- Specified by:
consumeEndian
in interfaceMarshalInputStream
-
read_boolean
public boolean read_boolean()
Description copied from class:InputStream
Reads a boolean value from this input stream.- Specified by:
read_boolean
in interfaceMarshalInputStream
- Specified by:
read_boolean
in classInputStream
- Returns:
- the
boolean
value read from this input stream
-
read_char
public char read_char()
Description copied from class:InputStream
Reads a char value from this input stream.- Specified by:
read_char
in interfaceMarshalInputStream
- Specified by:
read_char
in classInputStream
- Returns:
- the
char
value read from this input stream
-
read_wchar
public char read_wchar()
Description copied from class:InputStream
Reads a wide char value from this input stream.- Specified by:
read_wchar
in interfaceMarshalInputStream
- Specified by:
read_wchar
in classInputStream
- Returns:
- the
char
value read from this input stream
-
read_octet
public 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 interfaceMarshalInputStream
- Specified by:
read_octet
in classInputStream
- Returns:
- the
byte
value read from this input stream
-
read_short
public short read_short()
Description copied from class:InputStream
Reads a short value from this input stream.- Specified by:
read_short
in interfaceMarshalInputStream
- Specified by:
read_short
in classInputStream
- Returns:
- the
short
value read from this input stream
-
read_ushort
public short read_ushort()
Description copied from class:InputStream
Reads a unsigned short value from this input stream.- Specified by:
read_ushort
in interfaceMarshalInputStream
- Specified by:
read_ushort
in classInputStream
- Returns:
- the
short
value read from this input stream
-
read_long
public 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 interfaceMarshalInputStream
- Specified by:
read_long
in classInputStream
- Returns:
- the
int
value read from this input stream
-
read_ulong
public 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 interfaceMarshalInputStream
- Specified by:
read_ulong
in classInputStream
- Returns:
- the
int
value read from this input stream
-
read_longlong
public 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 interfaceMarshalInputStream
- Specified by:
read_longlong
in classInputStream
- Returns:
- the
long
value read from this input stream
-
read_ulonglong
public 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 interfaceMarshalInputStream
- Specified by:
read_ulonglong
in classInputStream
- Returns:
- the
long
value read from this input stream
-
read_float
public float read_float()
Description copied from class:InputStream
Reads a float value from this input stream.- Specified by:
read_float
in interfaceMarshalInputStream
- Specified by:
read_float
in classInputStream
- Returns:
- the
float
value read from this input stream
-
read_double
public double read_double()
Description copied from class:InputStream
Reads a double value from this input stream.- Specified by:
read_double
in interfaceMarshalInputStream
- Specified by:
read_double
in classInputStream
- Returns:
- the
double
value read from this input stream
-
read_string
public java.lang.String read_string()
Description copied from class:InputStream
Reads a string value from this input stream.- Specified by:
read_string
in interfaceMarshalInputStream
- Specified by:
read_string
in classInputStream
- Returns:
- the
String
value read from this input stream
-
read_wstring
public java.lang.String read_wstring()
Description copied from class:InputStream
Reads a wide string value from this input stream.- 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 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 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 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 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 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 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 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 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 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 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 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 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 Object read_Object()
Description copied from class:InputStream
Reads a CORBA object from this input stream.- Specified by:
read_Object
in interfaceMarshalInputStream
- Specified by:
read_Object
in classInputStream
- Returns:
- the
Object
instance read from this input stream
-
read_value
public 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_TypeCode
public TypeCode read_TypeCode()
Description copied from class:InputStream
Reads a TypeCode from this input stream.- Specified by:
read_TypeCode
in interfaceMarshalInputStream
- Specified by:
read_TypeCode
in classInputStream
- Returns:
- the
TypeCode
instance read from this input stream
-
read_any
public Any read_any()
Description copied from class:InputStream
Reads an Any from this input stream.- Specified by:
read_any
in interfaceMarshalInputStream
- Specified by:
read_any
in classInputStream
- Returns:
- the
Any
instance read from this input stream
-
read_Principal
public 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_fixed
public 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 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
-
orb
public 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
-
addTypeCodeAtPosition
public void addTypeCodeAtPosition(TypeCodeImpl tc, int position)
- Specified by:
addTypeCodeAtPosition
in interfaceTypeCodeReader
-
getTypeCodeAtPosition
public TypeCodeImpl getTypeCodeAtPosition(int position)
- Specified by:
getTypeCodeAtPosition
in interfaceTypeCodeReader
-
setEnclosingInputStream
public void setEnclosingInputStream(InputStream enclosure)
- Specified by:
setEnclosingInputStream
in interfaceTypeCodeReader
-
getTopLevelStream
public TypeCodeReader getTopLevelStream()
- Specified by:
getTopLevelStream
in interfaceTypeCodeReader
-
getTopLevelPosition
public int getTopLevelPosition()
- Specified by:
getTopLevelPosition
in interfaceTypeCodeReader
-
performORBVersionSpecificInit
public void performORBVersionSpecificInit()
Description copied from interface:MarshalInputStream
This must be called once before unmarshaling valuetypes or anything that uses repository IDs. The ORB's version should be set to the desired value prior to calling.- Specified by:
performORBVersionSpecificInit
in interfaceMarshalInputStream
-
resetCodeSetConverters
public void resetCodeSetConverters()
Description copied from interface:MarshalInputStream
Tells the input stream to null any code set converter references, forcing it to reacquire them if it needs converters again. This is used when the server input stream needs to switch the connection's char code set converter to something different after reading the code set service context for the first time. Initially, we use ISO8859-1 to read the operation name (it can't be more than ASCII).- Specified by:
resetCodeSetConverters
in interfaceMarshalInputStream
-
printTypeMap
public void printTypeMap()
- Specified by:
printTypeMap
in interfaceTypeCodeReader
-
-