Class SeekableByteArrayInputStream

java.lang.Object
java.io.InputStream
java.io.ByteArrayInputStream
org.apache.drill.exec.store.dfs.SeekableByteArrayInputStream
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.fs.PositionedReadable, org.apache.hadoop.fs.Seekable

public class SeekableByteArrayInputStream extends ByteArrayInputStream implements org.apache.hadoop.fs.Seekable, org.apache.hadoop.fs.PositionedReadable
  • Constructor Details

    • SeekableByteArrayInputStream

      public SeekableByteArrayInputStream(byte[] buf)
  • Method Details

    • getPos

      public long getPos() throws IOException
      Specified by:
      getPos in interface org.apache.hadoop.fs.Seekable
      Throws:
      IOException
    • seek

      public void seek(long pos) throws IOException
      Specified by:
      seek in interface org.apache.hadoop.fs.Seekable
      Throws:
      IOException
    • seekToNewSource

      public boolean seekToNewSource(long targetPos) throws IOException
      Specified by:
      seekToNewSource in interface org.apache.hadoop.fs.Seekable
      Throws:
      IOException
    • read

      public int read(long position, byte[] buffer, int offset, int length) throws IOException
      Specified by:
      read in interface org.apache.hadoop.fs.PositionedReadable
      Throws:
      IOException
    • readFully

      public void readFully(long position, byte[] buffer) throws IOException
      Specified by:
      readFully in interface org.apache.hadoop.fs.PositionedReadable
      Throws:
      IOException
    • readFully

      public void readFully(long position, byte[] buffer, int offset, int length) throws IOException
      Specified by:
      readFully in interface org.apache.hadoop.fs.PositionedReadable
      Throws:
      IOException