Class InputBytes

All Implemented Interfaces:
Closeable, AutoCloseable, Input

public class InputBytes extends ByteArrayInputStream implements Input
An Input backed with data in a byte array.
  • Constructor Details

    • InputBytes

      public InputBytes(byte[] data)
      Construct for the given bytes.
    • InputBytes

      public InputBytes(ByteBuffer data)
      Construct for the given bytes.
  • Method Details

    • length

      public long length() throws IOException
      Description copied from interface: Input
      Return the total length of the input.
      Specified by:
      length in interface Input
      Throws:
      IOException
    • read

      public int read(long pos, byte[] b, int start, int len) throws IOException
      Description copied from interface: Input
      Positioned read.
      Specified by:
      read in interface Input
      Throws:
      IOException