Interface ISequentialOutStream

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

public interface ISequentialOutStream

Interface used to operate with sequential output stream.

Boris Brodski

Method Summary
 int write(byte[] data)
          Write data byte array to the stream.

Method Detail


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 less than data.length bytes. You must call Write function in loop, if you need to write 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.

data - data to write
count of written bytes
SevenZipException - in error case. If this method ends with an exception, the current operation will be reported to 7-Zip as failed. There are no guarantee, that there are no further call back methods will get called. The first and last thrown exceptions will be saved and thrown later on from the originally called method such as ISevenZipInArchive.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.