Interface ISequentialOutStream

All Known Subinterfaces:
IOutStream
All Known Implementing Classes:
ByteArrayStream, RandomAccessFileOutStream

public interface ISequentialOutStream
Interface used to operate with a sequential output stream.
Since:
4.65-1
Author:
Boris Brodski
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    write(byte[] data)
    Write data byte array to the stream.
  • Method Details

    • write

      int write(byte[] data) throws SevenZipException
      Write data byte array to the stream. If data.length > 0 this function must write at least 1 byte. This function is allowed to write fewer than data.length bytes. You must call the write() function in a loop if you need to write 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.
      Parameters:
      data - data to write
      Returns:
      count of written bytes
      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.