Class SequentialInStreamImpl

java.lang.Object
net.sf.sevenzipjbinding.impl.SequentialInStreamImpl
All Implemented Interfaces:
Closeable, AutoCloseable, ISequentialInStream

@Deprecated public class SequentialInStreamImpl extends Object implements ISequentialInStream
Implementation of ISequentialInStream based on InputStream.
Since:
4.65-1
Author:
Boris Brodski
  • Constructor Details

  • Method Details

    • read

      public int read(byte[] data) throws SevenZipException
      Deprecated.
      Reads at least 1 and maximum data.length bytes from the in-stream. If data.length == 0 0 should be returned. If data.length != 0, then return value 0 indicates end-of-stream (EOF). This means no more bytes can be read from the stream.
      This function is allowed to read fewer than the number of remaining bytes in the stream and fewer than data.length. You must call the read() function in a loop if you need an exact amount of data.

      Note: depending on the archive format and the data size this method may be called from different threads. Synchronized implementation may be required.
      Specified by:
      read in interface ISequentialInStream
      Parameters:
      data - buffer to get read data
      Returns:
      number of bytes read into the data array; 0 indicates end of stream.
      Throws:
      SevenZipException - in error case. If this method ends with an exception, the current operation will be reported to 7-Zip as failed. There is no guarantee that no further callback methods will be called. The first and last thrown exceptions will be saved and thrown later on from the originally called method such as IInArchive.extract() or SevenZip.openInArchive(). Up to four exceptions depending on the situation can be saved for further analysis. See SevenZipException and SevenZipException.printStackTraceExtended() for details.
    • getInputStream

      public InputStream getInputStream()
      Deprecated.
      Get underlaying input stream
      Returns:
      input stream
    • close

      public void close() throws IOException
      Deprecated.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException