Class ByteArrayDataInput

  • All Implemented Interfaces:
    Cloneable

    public final class ByteArrayDataInput
    extends DataInput
    DataInput backed by a byte array. WARNING: This class omits all low-level checks.
    • Constructor Detail

      • ByteArrayDataInput

        public ByteArrayDataInput​(byte[] bytes)
      • ByteArrayDataInput

        public ByteArrayDataInput​(byte[] bytes,
                                  int offset,
                                  int len)
      • ByteArrayDataInput

        public ByteArrayDataInput()
    • Method Detail

      • reset

        public void reset​(byte[] bytes)
      • rewind

        public void rewind()
      • getPosition

        public int getPosition()
      • setPosition

        public void setPosition​(int pos)
      • reset

        public void reset​(byte[] bytes,
                          int offset,
                          int len)
      • length

        public int length()
      • eof

        public boolean eof()
      • skipBytes

        public void skipBytes​(int count)
      • readBytes

        public void readBytes​(byte[] b,
                              int offset,
                              int len)
        Description copied from class: DataInput
        Reads a specified number of bytes into an array at the specified offset.
        Specified by:
        readBytes in class DataInput
        Parameters:
        b - the array to read bytes into
        offset - the offset in the array to start storing bytes
        len - the number of bytes to read
        See Also:
        DataOutput.writeBytes(byte[],int)