Class AbstractBytesObjectInput

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

    public abstract class AbstractBytesObjectInput
    extends java.lang.Object
    implements java.io.ObjectInput
    Array backed ObjectInput implementation. skip(long) and skipBytes(int) have been enhanced so that if a negative number is passed in, they skip backwards effectively providing rewind capabilities. This should be removed when the GlobalMarshaller is no longer based on StreamingMarshaller.
    • Constructor Detail

      • AbstractBytesObjectInput

        protected AbstractBytesObjectInput​(byte[] bytes,
                                           int offset)
    • Method Detail

      • read

        public int read()
        Specified by:
        read in interface java.io.ObjectInput
      • read

        public int read​(byte[] b)
        Specified by:
        read in interface java.io.ObjectInput
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
        Specified by:
        read in interface java.io.ObjectInput
      • skip

        public long skip​(long n)
        Specified by:
        skip in interface java.io.ObjectInput
      • available

        public int available()
        Specified by:
        available in interface java.io.ObjectInput
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.ObjectInput
      • readFully

        public void readFully​(byte[] b)
                       throws java.io.EOFException
        Specified by:
        readFully in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readFully

        public void readFully​(byte[] b,
                              int off,
                              int len)
                       throws java.io.EOFException
        Specified by:
        readFully in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • skipBytes

        public int skipBytes​(int n)
                      throws java.io.EOFException
        Specified by:
        skipBytes in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readBoolean

        public boolean readBoolean()
                            throws java.io.EOFException
        Specified by:
        readBoolean in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readByte

        public byte readByte()
                      throws java.io.EOFException
        Specified by:
        readByte in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readUnsignedByte

        public int readUnsignedByte()
                             throws java.io.EOFException
        Specified by:
        readUnsignedByte in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readShort

        public short readShort()
                        throws java.io.EOFException
        Specified by:
        readShort in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readUnsignedShort

        public int readUnsignedShort()
                              throws java.io.EOFException
        Specified by:
        readUnsignedShort in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readChar

        public char readChar()
                      throws java.io.EOFException
        Specified by:
        readChar in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readInt

        public int readInt()
                    throws java.io.EOFException
        Specified by:
        readInt in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readLong

        public long readLong()
                      throws java.io.EOFException
        Specified by:
        readLong in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readFloat

        public float readFloat()
                        throws java.io.EOFException
        Specified by:
        readFloat in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readDouble

        public double readDouble()
                          throws java.io.EOFException
        Specified by:
        readDouble in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readLine

        public java.lang.String readLine()
        Specified by:
        readLine in interface java.io.DataInput
      • readUTF

        public java.lang.String readUTF()
                                 throws java.io.EOFException
        Specified by:
        readUTF in interface java.io.DataInput
        Throws:
        java.io.EOFException
      • readString

        public java.lang.String readString()
                                    throws java.io.EOFException
        Throws:
        java.io.EOFException