Class ResourceInputStream

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

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

    • ResourceInputStream

      public ResourceInputStream(byte[] bytes)
  • Method Details

    • readFully

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

      public int read(long position, byte[] b, int off, int len)
      Specified by:
      read in interface org.apache.hadoop.fs.PositionedReadable
    • 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
    • getPos

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

      public int read(byte[] b) throws IOException
      Overrides:
      read in class InputStream
      Throws:
      IOException
    • seekToNewSource

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

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