Class EncapsInputStream

  • All Implemented Interfaces:
    MarshalInputStream, java.io.Closeable, java.io.Serializable, java.lang.AutoCloseable, DataInputStream, IDLEntity, ValueBase, ValueInputStream
    Direct Known Subclasses:
    AnyImpl.AnyInputStream, TypeCodeInputStream

    public class EncapsInputStream
    extends CDRInputObject
    Encapsulations are supposed to explicitly define their code sets and GIOP version. The original resolution to issue 2784 said that the defaults were UTF-8 and UTF-16, but that was not agreed upon. These streams currently use CDR 1.2 with ISO8859-1 for char/string and UTF16 for wchar/wstring. If no byte order marker is available, the endianness of the encapsulation is used. When more encapsulations arise that have their own special code sets defined, we can make all constructors take such parameters.
    See Also:
    Serialized Form
    • Constructor Detail

      • EncapsInputStream

        public EncapsInputStream​(ORB orb,
                                 byte[] buf,
                                 int size,
                                 java.nio.ByteOrder byteOrder,
                                 GIOPVersion version)
      • EncapsInputStream

        public EncapsInputStream​(ORB orb,
                                 java.nio.ByteBuffer byteBuffer,
                                 int size,
                                 java.nio.ByteOrder byteOrder,
                                 GIOPVersion version)
      • EncapsInputStream

        public EncapsInputStream​(ORB orb,
                                 byte[] data,
                                 int size)
      • EncapsInputStream

        public EncapsInputStream​(ORB orb,
                                 byte[] data,
                                 int size,
                                 GIOPVersion version)
      • EncapsInputStream

        public EncapsInputStream​(ORB orb,
                                 byte[] data,
                                 int size,
                                 GIOPVersion version,
                                 CodeBase codeBase)
        Full constructor with a CodeBase parameter useful for unmarshaling RMI-IIOP valuetypes (technically against the intention of an encapsulation, but necessary due to OMG issue 4795. Used by ServiceContexts.
        Parameters:
        orb - the ORB
        data - data to read in
        size - size of data
        version - GIOP version
        codeBase - CodeBase to use