Class CDRInputObject

    • Constructor Detail

      • CDRInputObject

        public CDRInputObject()
      • 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)
      • 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.
      • getCodeBase

        public CodeBase getCodeBase()
      • dprint

        protected void dprint​(java.lang.String msg)
      • 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 interface MarshalInputStream
        Specified by:
        read_boolean_array in class InputStream
        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 interface MarshalInputStream
        Specified by:
        read_char_array in class InputStream
        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 interface MarshalInputStream
        Specified by:
        read_wchar_array in class InputStream
        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 interface MarshalInputStream
        Specified by:
        read_octet_array in class InputStream
        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 interface MarshalInputStream
        Specified by:
        read_short_array in class InputStream
        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 interface MarshalInputStream
        Specified by:
        read_ushort_array in class InputStream
        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 interface MarshalInputStream
        Specified by:
        read_long_array in class InputStream
        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 interface MarshalInputStream
        Specified by:
        read_ulong_array in class InputStream
        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 interface MarshalInputStream
        Specified by:
        read_longlong_array in class InputStream
        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 interface MarshalInputStream
        Specified by:
        read_ulonglong_array in class InputStream
        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 interface MarshalInputStream
        Specified by:
        read_float_array in class InputStream
        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 interface MarshalInputStream
        Specified by:
        read_double_array in class InputStream
        Parameters:
        value - returned array of doubles.
        offset - offset on the stream.
        length - length of buffer to read
      • read_fixed

        public final java.math.BigDecimal read_fixed()
        Description copied from class: InputStream
        Reads a BigDecimal number.
        Overrides:
        read_fixed in class InputStream
        Returns:
        a java.math.BigDecimal number
      • 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 interface MarshalInputStream
        Overrides:
        read_Object in class InputStream
        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
      • 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 interface MarshalInputStream
        Overrides:
        read_value in class InputStream
        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 class InputStream
        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 class InputStream
        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 class InputStream
        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 class InputStream
        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 class InputStream
        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 class InputStream
        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.
      • 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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface DataInputStream
        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 interface ValueBase
        Returns:
        a String array--list of truncatable repository ids.
      • read

        public final int read​(byte[] b)
                       throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public final int read​(byte[] b,
                              int off,
                              int len)
                       throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • skip

        public final long skip​(long n)
                        throws java.io.IOException
        Overrides:
        skip in class java.io.InputStream
        Throws:
        java.io.IOException
      • available

        public final int available()
                            throws java.io.IOException
        Overrides:
        available in class java.io.InputStream
        Throws:
        java.io.IOException
      • 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.InputStream
        Throws:
        java.io.IOException
      • mark

        public final void mark​(int readlimit)
        Specified by:
        mark in interface MarshalInputStream
        Overrides:
        mark in class java.io.InputStream
      • reset

        public final void reset()
        Specified by:
        reset in interface MarshalInputStream
        Overrides:
        reset in class java.io.InputStream
      • markSupported

        public final boolean markSupported()
        Overrides:
        markSupported in class java.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()
      • 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 interface MarshalInputStream
      • 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 interface MarshalInputStream
      • setMessageMediator

        public void setMessageMediator​(MessageMediator messageMediator)
      • 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 interface ValueInputStream
      • 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 interface ValueInputStream