Package com.sun.corba.ee.impl.encoding
Class CDROutputStream_1_0
java.lang.Object
java.io.OutputStream
com.sun.corba.ee.impl.encoding.CDROutputStreamBase
com.sun.corba.ee.impl.encoding.CDROutputStream_1_0
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
CDROutputStream_1_1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String[]
private static final boolean
protected int
protected int
protected BufferManagerWrite
(package private) ByteBuffer
private CodeSetConversion.CTBConverter
private int
private int
private int
private int
protected boolean
private static final int
private static final String
private boolean
protected ORB
private RepositoryIdStrings
private RepositoryIdUtility
private CacheTable
<String> protected byte
private CacheTable
<Object> private ValueHandler
private CodeSetConversion.CTBConverter
protected static final ORBUtilSystemException
Fields inherited from class com.sun.corba.ee.impl.encoding.CDROutputStreamBase
parent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]
protected void
alignAndReserve
(int align, int n) (package private) void
alignOnBoundary
(int octetBoundary) (package private) static ByteBuffer
allocateBuffer
(ORB orb, BufferManagerWrite bufferManager, boolean usePooledByteBuffers) private void
blockSizePosition
(int blockSize) private void
callWriteValue
(OutputStream parent, Serializable object, byte streamFormatVersion) void
close()
protected final int
computeAlignment
(int align) private void
(package private) void
void
void
private void
endValueChunk
(boolean useChunking) (package private) void
private void
int
Returns the current position relative to the start of the message.protected CodeSetConversion.CTBConverter
private String
getCodebase
(Class cls) private EnumDesc
getEnumDesc
(String className, String enumValue) int
getIndex()
final int
getSize()
private short
getTypeModifier
(ValueHelper factory) protected CodeSetConversion.CTBConverter
protected void
grow
(int align, int n) protected void
handleSpecialChunkBegin
(int requiredSize) protected void
private void
inABlock()
void
init
(ORB orb, BufferManagerWrite bufferManager, byte streamFormatVersion, boolean usePooledByteBuffers) (package private) void
internalWriteOctetArray
(byte[] value, int offset, int length) private boolean
isCustom
(Serializable object, BoxedValueHelper factory) private void
mustChunk
(boolean flag) orb()
final void
private void
(package private) void
setHeaderPadding
(boolean headerPadding) void
setIndex
(int value) void
void
start_value
(String rep_id) private void
startValueChunk
(boolean useChunking) private void
startValueInfo
(String repId, int offset, int position) byte[]
protected byte[]
toByteArray
(int start) private void
updateIndirectionTable
(int indirection, Object key) void
write_Abstract
(Object value) void
void
final void
write_any_array
(Any[] value, int offset, int length) final void
write_boolean
(boolean x) final void
write_boolean_array
(boolean[] value, int offset, int length) void
write_char
(char x) final void
write_char_array
(char[] value, int offset, int length) private void
write_codebase
(String str, int pos) final void
write_double
(double x) final void
write_double_array
(double[] value, int offset, int length) void
write_fixed
(String string, int signum) void
write_fixed
(BigDecimal bigDecimal) void
write_fixed
(BigDecimal bigDecimal, short digits, short scale) final void
write_float
(float x) final void
write_float_array
(float[] value, int offset, int length) void
write_long
(int x) final void
write_long_array
(int[] value, int offset, int length) void
write_longlong
(long x) final void
write_longlong_array
(long[] value, int offset, int length) void
write_Object
(Object ref) void
write_octet
(byte x) final void
write_octet_array
(byte[] b, int offset, int length) void
private void
void
write_short
(short x) final void
write_short_array
(short[] value, int offset, int length) void
write_string
(String value) void
final void
write_ulong
(int x) final void
write_ulong_array
(int[] value, int offset, int length) final void
write_ulonglong
(long x) final void
write_ulonglong_array
(long[] value, int offset, int length) final void
write_ushort
(short x) final void
write_ushort_array
(short[] value, int offset, int length) void
write_value
(Serializable object) void
write_value
(Serializable object, Class clz) void
write_value
(Serializable object, String repository_id) void
write_value
(Serializable object, BoxedValueHelper factory) void
write_Value
(Serializable value) void
write_wchar
(char x) void
write_wchar_array
(char[] value, int offset, int length) void
write_wstring
(String value) private void
writeArray
(Serializable array, Class clazz) private void
writeBigEndianWchar
(char x) private void
writeClass
(String repository_id, Class clz, ClassInfoCache.ClassInfo cinfo) private void
writeClassBody
(Class clz, ClassInfoCache.ClassInfo cinfo) private void
writeEndTag
(boolean chunked) private void
writeIDLEntity
(IDLEntity object) private void
writeIDLValue
(Serializable object, String repID) void
writeIndirection
(int tag, int posIndirectedTo) private boolean
protected void
writeLongWithoutAlign
(int x) private void
Handles ORB versioning of the end tag.void
private void
writeRMIIIOPValueType
(Serializable object, Class clazz, ClassInfoCache.ClassInfo cinfo) protected int
writeString
(String value) void
private void
writeValueBase
(ValueBase object, Class clazz) private int
writeValueTag
(boolean chunkIt, boolean useRepId, String codebase) private void
writeWStringValue
(String string) Methods inherited from class com.sun.corba.ee.impl.encoding.CDROutputStreamBase
setParent, write, write_Context
Methods inherited from class java.io.OutputStream
flush, write, write
-
Field Details
-
INDIRECTION_TAG
private static final int INDIRECTION_TAG- See Also:
-
BIG_ENDIAN
private static final boolean BIG_ENDIAN- See Also:
-
bufferManagerWrite
-
byteBuffer
ByteBuffer byteBuffer -
orb
-
wrapper
-
blockSizeIndex
protected int blockSizeIndex -
blockSizePosition
protected int blockSizePosition -
streamFormatVersion
protected byte streamFormatVersion -
kWriteMethod
- See Also:
-
enumCache
-
codebaseCache
-
valueCache
-
repositoryIdCache
-
end_flag
private int end_flag -
chunkedValueNestingLevel
private int chunkedValueNestingLevel -
mustChunk
private boolean mustChunk -
inBlock
protected boolean inBlock -
end_flag_position
private int end_flag_position -
end_flag_index
private int end_flag_index -
valueHandler
-
repIdUtil
-
repIdStrs
-
charConverter
-
wcharConverter
-
_id
- See Also:
-
_ids
-
-
Constructor Details
-
CDROutputStream_1_0
public CDROutputStream_1_0()
-
-
Method Details
-
init
public void init(ORB orb, BufferManagerWrite bufferManager, byte streamFormatVersion, boolean usePooledByteBuffers) - Specified by:
init
in classCDROutputStreamBase
-
allocateBuffer
static ByteBuffer allocateBuffer(ORB orb, BufferManagerWrite bufferManager, boolean usePooledByteBuffers) -
createRepositoryIdHandlers
private void createRepositoryIdHandlers() -
getBufferManager
- Specified by:
getBufferManager
in classCDROutputStreamBase
-
toByteArray
public byte[] toByteArray()- Specified by:
toByteArray
in classCDROutputStreamBase
-
toByteArray
protected byte[] toByteArray(int start) - Specified by:
toByteArray
in classCDROutputStreamBase
-
getGIOPVersion
- Specified by:
getGIOPVersion
in classCDROutputStreamBase
-
setHeaderPadding
void setHeaderPadding(boolean headerPadding) - Specified by:
setHeaderPadding
in classCDROutputStreamBase
-
handleSpecialChunkBegin
protected void handleSpecialChunkBegin(int requiredSize) -
handleSpecialChunkEnd
protected void handleSpecialChunkEnd() -
computeAlignment
protected final int computeAlignment(int align) -
alignAndReserve
protected void alignAndReserve(int align, int n) -
grow
protected void grow(int align, int n) -
putEndian
- Specified by:
putEndian
in classCDROutputStreamBase
- Throws:
SystemException
-
freeInternalCaches
void freeInternalCaches()- Specified by:
freeInternalCaches
in classCDROutputStreamBase
-
write_octet
public void write_octet(byte x) - Specified by:
write_octet
in classCDROutputStreamBase
-
write_boolean
public final void write_boolean(boolean x) - Specified by:
write_boolean
in classCDROutputStreamBase
-
write_char
public void write_char(char x) - Specified by:
write_char
in classCDROutputStreamBase
-
writeBigEndianWchar
private void writeBigEndianWchar(char x) -
write_wchar
public void write_wchar(char x) - Specified by:
write_wchar
in classCDROutputStreamBase
-
write_short
public void write_short(short x) - Specified by:
write_short
in classCDROutputStreamBase
-
write_ushort
public final void write_ushort(short x) - Specified by:
write_ushort
in classCDROutputStreamBase
-
write_long
public void write_long(int x) - Specified by:
write_long
in classCDROutputStreamBase
-
write_ulong
public final void write_ulong(int x) - Specified by:
write_ulong
in classCDROutputStreamBase
-
write_longlong
public void write_longlong(long x) - Specified by:
write_longlong
in classCDROutputStreamBase
-
write_ulonglong
public final void write_ulonglong(long x) - Specified by:
write_ulonglong
in classCDROutputStreamBase
-
write_float
public final void write_float(float x) - Specified by:
write_float
in classCDROutputStreamBase
-
write_double
public final void write_double(double x) - Specified by:
write_double
in classCDROutputStreamBase
-
write_string
- Specified by:
write_string
in classCDROutputStreamBase
-
writeString
-
write_wstring
- Specified by:
write_wstring
in classCDROutputStreamBase
-
internalWriteOctetArray
void internalWriteOctetArray(byte[] value, int offset, int length) -
write_octet_array
public final void write_octet_array(byte[] b, int offset, int length) - Specified by:
write_octet_array
in classCDROutputStreamBase
-
write_Principal
- Specified by:
write_Principal
in classCDROutputStreamBase
-
write_any
- Specified by:
write_any
in classCDROutputStreamBase
-
write_TypeCode
- Specified by:
write_TypeCode
in classCDROutputStreamBase
-
write_Object
- Specified by:
write_Object
in classCDROutputStreamBase
-
write_abstract_interface
- Specified by:
write_abstract_interface
in classCDROutputStreamBase
-
write_value
- Specified by:
write_value
in classCDROutputStreamBase
-
startValueChunk
private void startValueChunk(boolean useChunking) -
endValueChunk
private void endValueChunk(boolean useChunking) -
writeWStringValue
-
getCodebase
-
writeArray
-
writeValueBase
-
writeRMIIIOPValueType
private void writeRMIIIOPValueType(Serializable object, Class clazz, ClassInfoCache.ClassInfo cinfo) -
callWriteValue
-
getEnumDesc
-
write_value
- Specified by:
write_value
in classCDROutputStreamBase
-
write_value
- Specified by:
write_value
in classCDROutputStreamBase
-
write_value
- Specified by:
write_value
in classCDROutputStreamBase
-
isCustom
-
getTypeModifier
-
get_offset
public int get_offset()Returns the current position relative to the start of the message.- Returns:
- current position
-
start_block
public void start_block()- Specified by:
start_block
in classCDROutputStreamBase
-
writeLongWithoutAlign
protected void writeLongWithoutAlign(int x) -
inABlock
@InfoMethod private void inABlock() -
blockSizePosition
@InfoMethod private void blockSizePosition(int blockSize) -
removingZeroLengthBlock
@InfoMethod private void removingZeroLengthBlock() -
end_block
public void end_block()- Specified by:
end_block
in classCDROutputStreamBase
-
orb
- Specified by:
orb
in classCDROutputStreamBase
-
write_boolean_array
public final void write_boolean_array(boolean[] value, int offset, int length) - Specified by:
write_boolean_array
in classCDROutputStreamBase
-
write_char_array
public final void write_char_array(char[] value, int offset, int length) - Specified by:
write_char_array
in classCDROutputStreamBase
-
write_wchar_array
public void write_wchar_array(char[] value, int offset, int length) - Specified by:
write_wchar_array
in classCDROutputStreamBase
-
write_short_array
public final void write_short_array(short[] value, int offset, int length) - Specified by:
write_short_array
in classCDROutputStreamBase
-
write_ushort_array
public final void write_ushort_array(short[] value, int offset, int length) - Specified by:
write_ushort_array
in classCDROutputStreamBase
-
write_long_array
public final void write_long_array(int[] value, int offset, int length) - Specified by:
write_long_array
in classCDROutputStreamBase
-
write_ulong_array
public final void write_ulong_array(int[] value, int offset, int length) - Specified by:
write_ulong_array
in classCDROutputStreamBase
-
write_longlong_array
public final void write_longlong_array(long[] value, int offset, int length) - Specified by:
write_longlong_array
in classCDROutputStreamBase
-
write_ulonglong_array
public final void write_ulonglong_array(long[] value, int offset, int length) - Specified by:
write_ulonglong_array
in classCDROutputStreamBase
-
write_float_array
public final void write_float_array(float[] value, int offset, int length) - Specified by:
write_float_array
in classCDROutputStreamBase
-
write_double_array
public final void write_double_array(double[] value, int offset, int length) - Specified by:
write_double_array
in classCDROutputStreamBase
-
write_any_array
- Specified by:
write_any_array
in classCDROutputStreamBase
-
writeTo
- Specified by:
writeTo
in classCDROutputStreamBase
- Throws:
IOException
-
writeOctetSequenceTo
- Specified by:
writeOctetSequenceTo
in classCDROutputStreamBase
-
getSize
public final int getSize()- Specified by:
getSize
in classCDROutputStreamBase
-
getIndex
public int getIndex()- Specified by:
getIndex
in classCDROutputStreamBase
-
setIndex
public void setIndex(int value) - Specified by:
setIndex
in classCDROutputStreamBase
-
getByteBuffer
- Specified by:
getByteBuffer
in classCDROutputStreamBase
-
freeValueCache
private void freeValueCache() -
updateIndirectionTable
-
writeIndirectionIfPossible
-
write_repositoryId
-
write_codebase
-
writeValueTag
-
writeIDLValue
-
writeEndTag
private void writeEndTag(boolean chunked) -
writeNestingLevel
private void writeNestingLevel()Handles ORB versioning of the end tag. Should only be called if chunking. If talking to our older ORBs (Standard Extension, Kestrel, and Ladybird), write the end flag that takes into account all enclosing valuetypes. If talking a newer or foreign ORB, or if the orb instance is null, write the end flag that only takes into account the enclosing chunked valuetypes. -
writeClass
-
writeClassBody
-
writeIDLEntity
-
write_Abstract
- Specified by:
write_Abstract
in classCDROutputStreamBase
-
write_Value
- Specified by:
write_Value
in classCDROutputStreamBase
-
write_fixed
- Specified by:
write_fixed
in classCDROutputStreamBase
-
write_fixed
- Specified by:
write_fixed
in classCDROutputStreamBase
-
write_fixed
-
_truncatable_ids
- Specified by:
_truncatable_ids
in classCDROutputStreamBase
-
writeIndirection
public void writeIndirection(int tag, int posIndirectedTo) - Specified by:
writeIndirection
in classCDROutputStreamBase
-
getCharConverter
-
getWCharConverter
-
alignOnBoundary
void alignOnBoundary(int octetBoundary) - Specified by:
alignOnBoundary
in classCDROutputStreamBase
-
startValueInfo
-
start_value
- Specified by:
start_value
in classCDROutputStreamBase
-
mustChunk
@InfoMethod private void mustChunk(boolean flag) -
end_value
public void end_value()- Specified by:
end_value
in classCDROutputStreamBase
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
dereferenceBuffer
void dereferenceBuffer()- Specified by:
dereferenceBuffer
in classCDROutputStreamBase
-