Class ObjectInputChannel

  • All Implemented Interfaces:
    java.io.DataInput, java.io.DataOutput, java.io.ObjectInput, java.io.ObjectOutput, java.lang.AutoCloseable

    public class ObjectInputChannel
    extends DataStream
    • Field Detail

      • EMPTY_CONTEXT

        private static final java.lang.Object[] EMPTY_CONTEXT
      • ch

        private final java.nio.channels.ReadableByteChannel ch
      • capacity

        private int capacity
      • context

        private java.lang.Object[] context
      • contextSize

        private int contextSize
      • bytesRead

        private long bytesRead
    • Constructor Detail

      • ObjectInputChannel

        public ObjectInputChannel​(java.nio.channels.ReadableByteChannel ch)
      • ObjectInputChannel

        public ObjectInputChannel​(java.nio.channels.ReadableByteChannel ch,
                                  int bufSize)
    • Method Detail

      • getBytesRead

        public long getBytesRead()
      • readObject

        public java.lang.Object readObject()
                                    throws java.io.IOException,
                                           java.lang.ClassNotFoundException
        Specified by:
        readObject in interface java.io.ObjectInput
        Overrides:
        readObject in class DataStream
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • reset

        public void reset()
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.ObjectInput
        Specified by:
        close in interface java.io.ObjectOutput
        Overrides:
        close in class DataStream
        Throws:
        java.io.IOException
      • register

        public void register​(java.lang.Object obj)
        Overrides:
        register in class DataStream
      • alloc

        protected long alloc​(int size)
                      throws java.io.IOException
        Overrides:
        alloc in class DataStream
        Throws:
        java.io.IOException
      • fetch

        private void fetch​(int size)
                    throws java.io.IOException
        Throws:
        java.io.IOException