Class CDROutputStream_1_0

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable
    Direct Known Subclasses:
    CDROutputStream_1_1

    public class CDROutputStream_1_0
    extends CDROutputStreamBase
    • Field Detail

      • byteBuffer

        java.nio.ByteBuffer byteBuffer
      • orb

        protected ORB orb
      • blockSizeIndex

        protected int blockSizeIndex
      • blockSizePosition

        protected int blockSizePosition
      • streamFormatVersion

        protected byte streamFormatVersion
      • enumCache

        java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​EnumDesc>> enumCache
      • codebaseCache

        private java.util.Map<java.lang.String,​java.lang.Integer> codebaseCache
      • valueCache

        private CacheTable<java.lang.Object> valueCache
      • repositoryIdCache

        private CacheTable<java.lang.String> 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
      • _ids

        private static final java.lang.String[] _ids
    • Constructor Detail

      • CDROutputStream_1_0

        public CDROutputStream_1_0()
    • Method Detail

      • allocateBuffer

        static java.nio.ByteBuffer allocateBuffer​(ORB orb,
                                                  BufferManagerWrite bufferManager,
                                                  boolean usePooledByteBuffers)
      • createRepositoryIdHandlers

        private void createRepositoryIdHandlers()
      • 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)
      • writeBigEndianWchar

        private void writeBigEndianWchar​(char x)
      • writeString

        protected int writeString​(java.lang.String value)
      • internalWriteOctetArray

        void internalWriteOctetArray​(byte[] value,
                                     int offset,
                                     int length)
      • write_value

        public void write_value​(java.io.Serializable object,
                                java.lang.Class clz)
        Specified by:
        write_value in class CDROutputStreamBase
      • startValueChunk

        private void startValueChunk​(boolean useChunking)
      • endValueChunk

        private void endValueChunk​(boolean useChunking)
      • writeWStringValue

        private void writeWStringValue​(java.lang.String string)
      • getCodebase

        private java.lang.String getCodebase​(java.lang.Class cls)
      • writeArray

        private void writeArray​(java.io.Serializable array,
                                java.lang.Class clazz)
      • writeValueBase

        private void writeValueBase​(ValueBase object,
                                    java.lang.Class clazz)
      • writeRMIIIOPValueType

        private void writeRMIIIOPValueType​(java.io.Serializable object,
                                           java.lang.Class clazz,
                                           ClassInfoCache.ClassInfo cinfo)
      • callWriteValue

        private void callWriteValue​(OutputStream parent,
                                    java.io.Serializable object,
                                    byte streamFormatVersion)
      • getEnumDesc

        private EnumDesc getEnumDesc​(java.lang.String className,
                                     java.lang.String enumValue)
      • write_value

        public void write_value​(java.io.Serializable object,
                                java.lang.String repository_id)
        Specified by:
        write_value in class CDROutputStreamBase
      • isCustom

        private boolean isCustom​(java.io.Serializable object,
                                 BoxedValueHelper factory)
      • getTypeModifier

        private short getTypeModifier​(ValueHelper factory)
      • get_offset

        public int get_offset()
        Returns the current position relative to the start of the message.
        Returns:
        current position
      • writeLongWithoutAlign

        protected void writeLongWithoutAlign​(int x)
      • inABlock

        @InfoMethod
        private void inABlock()
      • blockSizePosition

        @InfoMethod
        private void blockSizePosition​(int blockSize)
      • removingZeroLengthBlock

        @InfoMethod
        private void removingZeroLengthBlock()
      • writeTo

        public void writeTo​(java.io.OutputStream s)
                     throws java.io.IOException
        Specified by:
        writeTo in class CDROutputStreamBase
        Throws:
        java.io.IOException
      • freeValueCache

        private void freeValueCache()
      • updateIndirectionTable

        private void updateIndirectionTable​(int indirection,
                                            java.lang.Object key)
      • writeIndirectionIfPossible

        private boolean writeIndirectionIfPossible​(java.io.Serializable object)
      • write_repositoryId

        private void write_repositoryId​(java.lang.String id)
      • write_codebase

        private void write_codebase​(java.lang.String str,
                                    int pos)
      • writeValueTag

        private int writeValueTag​(boolean chunkIt,
                                  boolean useRepId,
                                  java.lang.String codebase)
      • writeIDLValue

        private void writeIDLValue​(java.io.Serializable object,
                                   java.lang.String repID)
      • 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

        private void writeClass​(java.lang.String repository_id,
                                java.lang.Class clz,
                                ClassInfoCache.ClassInfo cinfo)
      • writeIDLEntity

        private void writeIDLEntity​(IDLEntity object)
      • write_fixed

        public void write_fixed​(java.math.BigDecimal bigDecimal,
                                short digits,
                                short scale)
        Specified by:
        write_fixed in class CDROutputStreamBase
      • write_fixed

        public void write_fixed​(java.lang.String string,
                                int signum)
      • startValueInfo

        @InfoMethod
        private void startValueInfo​(java.lang.String repId,
                                    int offset,
                                    int position)
      • mustChunk

        @InfoMethod
        private void mustChunk​(boolean flag)
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.OutputStream
        Throws:
        java.io.IOException