Package com.sun.corba.ee.impl.encoding
Class CDRInputStream_1_0
java.lang.Object
java.io.InputStream
com.sun.corba.ee.impl.encoding.CDRInputStreamBase
com.sun.corba.ee.impl.encoding.CDRInputStream_1_0
- All Implemented Interfaces:
RestorableInputStream
,Closeable
,AutoCloseable
- Direct Known Subclasses:
CDRInputStream_1_1
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String[]
protected int
protected BufferManagerRead
protected ByteBuffer
private CodeSetConversion.BTCConverter
private int
private CacheTable
<String> protected int
protected boolean
private static final String
protected MarkAndResetHandler
private static final int
private static final OMGSystemException
protected ORB
private RepositoryIdStrings
private RepositoryIdUtility
private CacheTable
<String> private boolean
protected int
private CacheTable
<Object> protected ValueHandler
protected int
private CodeSetConversion.BTCConverter
protected static final ORBUtilSystemException
Fields inherited from class com.sun.corba.ee.impl.encoding.CDRInputStreamBase
parent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]
protected void
alignAndCheck
(int align, int n) (package private) void
alignOnBoundary
(int octetBoundary) Aligns the current position on the given octet boundary if there are enough bytes available to do so.protected void
checkBlockLength
(int align, int dataSize) protected final void
checkForNegativeLength
(int length) private void
chunkedNestingLevel
(int nl) private void
void
close()
protected final int
computeAlignment
(int index, int align) final void
private void
dup()
private void
void
private void
endFlag
(int value) private void
endTag
(int endTag) protected int
int
protected CodeSetConversion.BTCConverter
private Class
<?> getClassFromString
(String repositoryIDString, String codebaseURL, Class<?> expectedType) Attempts to find the class described by the given repository ID string and expected type.(package private) CodeBase
(package private) char[]
getConvertedChars
(int numBytes, CodeSetConversion.BTCConverter converter) getInterfacesList
(String[] interfaces) int
protected CodeSetConversion.BTCConverter
protected void
grow
(int align, int n) private void
private Serializable
private void
indirectionValue
(int indir) (package private) void
init
(ORB orb, ByteBuffer byteBuffer, int bufferSize, ByteOrder byteOrder, BufferManagerRead bufferManager) static Object
internalIORToObject
(IOR ior, PresentationManager.StubFactory stubFactory, ORB orb) private String
internalReadString
(int len) private boolean
isCustomType
(ValueHelper helper) void
mark
(int readlimit) (package private) final String
private void
private void
private void
nullIOR()
orb()
void
private void
peekNextLong
(long val) (package private) void
read_any()
final void
read_any_array
(Any[] value, int offset, int length) void
read_any_array
(AnySeqHolder seq, int offset, int length) final boolean
final void
read_boolean_array
(boolean[] value, int offset, int length) void
read_boolean_array
(BooleanSeqHolder seq, int offset, int length) final char
final void
read_char_array
(char[] value, int offset, int length) void
read_char_array
(CharSeqHolder seq, int offset, int length) private String
final double
final void
read_double_array
(double[] value, int offset, int length) void
read_double_array
(DoubleSeqHolder seq, int offset, int length) read_fixed
(short digits, short scale) private StringBuffer
final float
final void
read_float_array
(float[] value, int offset, int length) void
read_float_array
(FloatSeqHolder seq, int offset, int length) final int
final void
read_long_array
(int[] value, int offset, int length) void
read_long_array
(LongSeqHolder seq, int offset, int length) final long
final void
read_longlong_array
(long[] value, int offset, int length) void
read_longlong_array
(LongLongSeqHolder seq, int offset, int length) read_Object
(Class clz) final byte
final void
read_octet_array
(byte[] buffer, int offset, int length) void
read_octet_array
(OctetSeqHolder seq, int offset, int length) private String
private String
final short
final void
read_short_array
(short[] value, int offset, int length) void
read_short_array
(ShortSeqHolder seq, int offset, int length) final String
final int
final void
read_ulong_array
(int[] value, int offset, int length) void
read_ulong_array
(ULongSeqHolder seq, int offset, int length) final long
final void
read_ulonglong_array
(long[] value, int offset, int length) void
read_ulonglong_array
(ULongLongSeqHolder seq, int offset, int length) final short
final void
read_ushort_array
(short[] value, int offset, int length) void
read_ushort_array
(UShortSeqHolder seq, int offset, int length) read_value
(Serializable value) read_value
(Class expectedType) read_value
(String repositoryId) read_value
(BoxedValueHelper factory) char
final void
read_wchar_array
(char[] value, int offset, int length) void
read_wchar_array
(WCharSeqHolder seq, int offset, int length) private Object
readBoxedIDLEntity
(Class<?> clazz, String codebase) private Class
<?> private void
readClassCodebases
(String codebases, String repoId) private void
End tags are only written for chunked valuetypes.private Object
readIDLValue
(int indirection, String repId, Class<?> clazz, ClassInfoCache.ClassInfo cinfo, String codebase) private Object
readIDLValueWithHelper
(ValueHelper helper, int indirection) private String
readRepositoryIds
(int valueTag, Class<?> expectedType, ClassInfoCache.ClassInfo cinfo, String expectedTypeRepId) private String
readRepositoryIds
(int valueTag, Class<?> expectedType, ClassInfoCache.ClassInfo cinfo, String expectedTypeRepId, BoxedValueHelper factory) Examines the valuetag to see how many (if any) repository IDs are present on the wire.private Object
readRMIIIOPValueType
(int indirection, Class<?> valueClass, String repositoryIDString) protected final String
readStringOrIndirection
(boolean allowIndirection) private int
private void
repositoryIdString
(String str) void
reset()
void
void
restoreInternalState
(Object streamMemento) void
setBufferLength
(int value) (package private) void
setHeaderPadding
(boolean headerPadding) void
setIndex
(int value) private void
skipToOffset
(int offset) private void
void
private void
private void
private void
valueClass
(Class cls) private void
valueTag
(int value) Methods inherited from class com.sun.corba.ee.impl.encoding.CDRInputStreamBase
markSupported, read, read_Context, setParent
Methods inherited from class java.io.InputStream
available, read, read, skip
-
Field Details
-
wrapper
-
omgWrapper
-
K_READ_METHOD
- See Also:
-
MAX_BLOCK_LENGTH
private static final int MAX_BLOCK_LENGTH- See Also:
-
bufferManagerRead
-
byteBuffer
-
orb
-
valueHandler
-
valueCache
-
repositoryIdCache
-
codebaseCache
-
blockLength
protected int blockLength -
end_flag
protected int end_flag -
chunkedValueNestingLevel
private int chunkedValueNestingLevel -
valueIndirection
protected int valueIndirection -
stringIndirection
protected int stringIndirection -
isChunked
protected boolean isChunked -
repIdUtil
-
repIdStrs
-
charConverter
-
wcharConverter
-
specialNoOptionalDataState
private boolean specialNoOptionalDataState -
_id
- See Also:
-
_ids
-
markAndResetHandler
-
-
Constructor Details
-
CDRInputStream_1_0
public CDRInputStream_1_0()
-
-
Method Details
-
newEmptyString
-
dup
- Specified by:
dup
in classCDRInputStreamBase
-
init
void init(ORB orb, ByteBuffer byteBuffer, int bufferSize, ByteOrder byteOrder, BufferManagerRead bufferManager) - Specified by:
init
in classCDRInputStreamBase
-
performORBVersionSpecificInit
void performORBVersionSpecificInit()- Specified by:
performORBVersionSpecificInit
in classCDRInputStreamBase
-
createRepositoryIdHandlers
private void createRepositoryIdHandlers() -
getGIOPVersion
- Specified by:
getGIOPVersion
in classCDRInputStreamBase
-
setHeaderPadding
void setHeaderPadding(boolean headerPadding) - Specified by:
setHeaderPadding
in classCDRInputStreamBase
-
computeAlignment
protected final int computeAlignment(int index, int align) -
notChunked
@InfoMethod private void notChunked() -
checkBlockLength
protected void checkBlockLength(int align, int dataSize) -
alignAndCheck
protected void alignAndCheck(int align, int n) -
grow
protected void grow(int align, int n) -
consumeEndian
public final void consumeEndian()- Specified by:
consumeEndian
in classCDRInputStreamBase
-
read_boolean
public final boolean read_boolean()- Specified by:
read_boolean
in classCDRInputStreamBase
-
read_char
public final char read_char()- Specified by:
read_char
in classCDRInputStreamBase
-
read_wchar
public char read_wchar()- Specified by:
read_wchar
in classCDRInputStreamBase
-
read_octet
public final byte read_octet()- Specified by:
read_octet
in classCDRInputStreamBase
-
read_short
public final short read_short()- Specified by:
read_short
in classCDRInputStreamBase
-
read_ushort
public final short read_ushort()- Specified by:
read_ushort
in classCDRInputStreamBase
-
read_long
public final int read_long()- Specified by:
read_long
in classCDRInputStreamBase
-
read_ulong
public final int read_ulong()- Specified by:
read_ulong
in classCDRInputStreamBase
-
read_longlong
public final long read_longlong()- Specified by:
read_longlong
in classCDRInputStreamBase
-
read_ulonglong
public final long read_ulonglong()- Specified by:
read_ulonglong
in classCDRInputStreamBase
-
read_float
public final float read_float()- Specified by:
read_float
in classCDRInputStreamBase
-
read_double
public final double read_double()- Specified by:
read_double
in classCDRInputStreamBase
-
checkForNegativeLength
protected final void checkForNegativeLength(int length) -
readStringOrIndirection
-
internalReadString
-
read_string
- Specified by:
read_string
in classCDRInputStreamBase
-
read_wstring
- Specified by:
read_wstring
in classCDRInputStreamBase
-
read_octet_array
public final void read_octet_array(byte[] buffer, int offset, int length) - Specified by:
read_octet_array
in classCDRInputStreamBase
-
read_Principal
- Specified by:
read_Principal
in classCDRInputStreamBase
-
read_TypeCode
- Specified by:
read_TypeCode
in classCDRInputStreamBase
-
read_any
- Specified by:
read_any
in classCDRInputStreamBase
-
read_Object
- Specified by:
read_Object
in classCDRInputStreamBase
-
nullIOR
@InfoMethod private void nullIOR() -
className
-
stubFactory
-
read_Object
- Specified by:
read_Object
in classCDRInputStreamBase
-
internalIORToObject
public static Object internalIORToObject(IOR ior, PresentationManager.StubFactory stubFactory, ORB orb) -
read_abstract_interface
- Specified by:
read_abstract_interface
in classCDRInputStreamBase
-
read_abstract_interface
- Specified by:
read_abstract_interface
in classCDRInputStreamBase
-
read_value
- Specified by:
read_value
in classCDRInputStreamBase
-
indirectionValue
@InfoMethod private void indirectionValue(int indir) -
handleIndirection
-
readRepositoryIds
private String readRepositoryIds(int valueTag, Class<?> expectedType, ClassInfoCache.ClassInfo cinfo, String expectedTypeRepId) -
readRepositoryIds
private String readRepositoryIds(int valueTag, Class<?> expectedType, ClassInfoCache.ClassInfo cinfo, String expectedTypeRepId, BoxedValueHelper factory) Examines the valuetag to see how many (if any) repository IDs are present on the wire. If no repository ID information is on the wire but the expectedType or expectedTypeRepId is known, it will return one of those (favoring the expectedType's repId). Failing that, it uses the supplied BoxedValueHelper to obtain the repository ID, as a last resort. -
readRMIIIOPValueType
-
repositoryIdString
-
valueClass
-
noProxyInterfaces
@InfoMethod private void noProxyInterfaces() -
read_value
- Specified by:
read_value
in classCDRInputStreamBase
-
getInterfacesList
-
read_value
- Specified by:
read_value
in classCDRInputStreamBase
-
isCustomType
-
read_value
- Specified by:
read_value
in classCDRInputStreamBase
-
read_value
- Specified by:
read_value
in classCDRInputStreamBase
-
readClassCodebases
-
readClass
-
readIDLValueWithHelper
-
readBoxedIDLEntity
-
readIDLValue
private Object readIDLValue(int indirection, String repId, Class<?> clazz, ClassInfoCache.ClassInfo cinfo, String codebase) -
endTag
@InfoMethod private void endTag(int endTag) -
chunkedNestingLevel
@InfoMethod private void chunkedNestingLevel(int nl) -
endFlag
@InfoMethod private void endFlag(int value) -
readEndTag
private void readEndTag()End tags are only written for chunked valuetypes. Before Merlin, our ORBs wrote end tags which took into account all enclosing valuetypes. This was changed by an interop resolution (see details around chunkedValueNestingLevel) to only include enclosing chunked types. ORB versioning and end tag compaction are handled here. -
get_offset
protected int get_offset() -
unreadLastLong
@InfoMethod private void unreadLastLong() -
start_block
private void start_block() -
peekNextLong
@InfoMethod private void peekNextLong(long val) -
handleEndOfValue
private void handleEndOfValue() -
end_block
private void end_block() -
readValueTag
private int readValueTag() -
orb
- Specified by:
orb
in classCDRInputStreamBase
-
read_boolean_array
public final void read_boolean_array(boolean[] value, int offset, int length) - Specified by:
read_boolean_array
in classCDRInputStreamBase
-
read_char_array
public final void read_char_array(char[] value, int offset, int length) - Specified by:
read_char_array
in classCDRInputStreamBase
-
read_wchar_array
public final void read_wchar_array(char[] value, int offset, int length) - Specified by:
read_wchar_array
in classCDRInputStreamBase
-
read_short_array
public final void read_short_array(short[] value, int offset, int length) - Specified by:
read_short_array
in classCDRInputStreamBase
-
read_ushort_array
public final void read_ushort_array(short[] value, int offset, int length) - Specified by:
read_ushort_array
in classCDRInputStreamBase
-
read_long_array
public final void read_long_array(int[] value, int offset, int length) - Specified by:
read_long_array
in classCDRInputStreamBase
-
read_ulong_array
public final void read_ulong_array(int[] value, int offset, int length) - Specified by:
read_ulong_array
in classCDRInputStreamBase
-
read_longlong_array
public final void read_longlong_array(long[] value, int offset, int length) - Specified by:
read_longlong_array
in classCDRInputStreamBase
-
read_ulonglong_array
public final void read_ulonglong_array(long[] value, int offset, int length) - Specified by:
read_ulonglong_array
in classCDRInputStreamBase
-
read_float_array
public final void read_float_array(float[] value, int offset, int length) - Specified by:
read_float_array
in classCDRInputStreamBase
-
read_double_array
public final void read_double_array(double[] value, int offset, int length) - Specified by:
read_double_array
in classCDRInputStreamBase
-
read_any_array
-
read_repositoryIds
-
read_repositoryId
-
read_codebase_URL
-
read_Abstract
- Specified by:
read_Abstract
in classCDRInputStreamBase
-
read_Value
- Specified by:
read_Value
in classCDRInputStreamBase
-
read_any_array
- Specified by:
read_any_array
in classCDRInputStreamBase
-
read_boolean_array
- Specified by:
read_boolean_array
in classCDRInputStreamBase
-
read_char_array
- Specified by:
read_char_array
in classCDRInputStreamBase
-
read_wchar_array
- Specified by:
read_wchar_array
in classCDRInputStreamBase
-
read_octet_array
- Specified by:
read_octet_array
in classCDRInputStreamBase
-
read_short_array
- Specified by:
read_short_array
in classCDRInputStreamBase
-
read_ushort_array
- Specified by:
read_ushort_array
in classCDRInputStreamBase
-
read_long_array
- Specified by:
read_long_array
in classCDRInputStreamBase
-
read_ulong_array
- Specified by:
read_ulong_array
in classCDRInputStreamBase
-
read_ulonglong_array
- Specified by:
read_ulonglong_array
in classCDRInputStreamBase
-
read_longlong_array
- Specified by:
read_longlong_array
in classCDRInputStreamBase
-
read_float_array
- Specified by:
read_float_array
in classCDRInputStreamBase
-
read_double_array
- Specified by:
read_double_array
in classCDRInputStreamBase
-
read_fixed
- Specified by:
read_fixed
in classCDRInputStreamBase
-
read_fixed
- Specified by:
read_fixed
in classCDRInputStreamBase
-
read_fixed_buffer
-
_truncatable_ids
- Specified by:
_truncatable_ids
in classCDRInputStreamBase
-
getBufferLength
public int getBufferLength()- Specified by:
getBufferLength
in classCDRInputStreamBase
-
setBufferLength
public void setBufferLength(int value) - Specified by:
setBufferLength
in classCDRInputStreamBase
-
setIndex
public void setIndex(int value) - Specified by:
setIndex
in classCDRInputStreamBase
-
getByteOrder
- Specified by:
getByteOrder
in classCDRInputStreamBase
-
orb
- Specified by:
orb
in classCDRInputStreamBase
-
getBufferManager
- Specified by:
getBufferManager
in classCDRInputStreamBase
-
skipToOffset
private void skipToOffset(int offset) -
createStreamMemento
- Specified by:
createStreamMemento
in interfaceRestorableInputStream
-
restoreInternalState
- Specified by:
restoreInternalState
in interfaceRestorableInputStream
-
getPosition
public int getPosition()- Specified by:
getPosition
in classCDRInputStreamBase
-
mark
public void mark(int readlimit) - Specified by:
mark
in classCDRInputStreamBase
-
reset
public void reset()- Specified by:
reset
in classCDRInputStreamBase
-
getCodeBase
CodeBase getCodeBase()- Specified by:
getCodeBase
in classCDRInputStreamBase
-
getClassFromString
private Class<?> getClassFromString(String repositoryIDString, String codebaseURL, Class<?> expectedType) Attempts to find the class described by the given repository ID string and expected type. The first attempt is to find the class locally, falling back on the URL that came with the value. The second attempt is to use a URL from the remote CodeBase. -
getConvertedChars
-
getCharConverter
-
getWCharConverter
-
alignOnBoundary
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.- Specified by:
alignOnBoundary
in classCDRInputStreamBase
-
resetCodeSetConverters
public void resetCodeSetConverters()- Specified by:
resetCodeSetConverters
in classCDRInputStreamBase
-
valueTag
@InfoMethod private void valueTag(int value) -
start_value
public void start_value()- Specified by:
start_value
in classCDRInputStreamBase
-
end_value
public void end_value()- Specified by:
end_value
in classCDRInputStreamBase
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-