Class BoundedSeekableByteChannelInputStream

java.lang.Object
java.io.InputStream
org.apache.commons.compress.archivers.sevenz.BoundedSeekableByteChannelInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

class BoundedSeekableByteChannelInputStream extends InputStream
  • Field Details

  • Constructor Details

    • BoundedSeekableByteChannelInputStream

      public BoundedSeekableByteChannelInputStream(SeekableByteChannel channel, long size)
  • Method Details

    • read

      public int read() throws IOException
      Specified by:
      read in class InputStream
      Throws:
      IOException
    • read

      public int read(byte[] b, int off, int len) throws IOException
      Reads up to len bytes of data from the input stream into an array of bytes.

      An attempt is made to read as many as len bytes, but a smaller number may be read. The number of bytes actually read is returned as an integer.

      This implementation may return 0 if the underlying SeekableByteChannel is non-blocking and currently hasn't got any bytes available.

      Overrides:
      read in class InputStream
      Throws:
      IOException
    • read

      private int read(int len) throws IOException
      Throws:
      IOException
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class InputStream