| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.sevenzipjbinding.impl.RandomAccessFileOutStream
public class RandomAccessFileOutStream
Implementation of IOutStream using RandomAccessFile.
| Field Summary | 
|---|
| Fields inherited from interface net.sf.sevenzipjbinding.ISeekableStream | 
|---|
| SEEK_CUR, SEEK_END, SEEK_SET | 
| Constructor Summary | |
|---|---|
| RandomAccessFileOutStream(java.io.RandomAccessFile randomAccessFile)Constructs instance of the class from random access file. | |
| Method Summary | |
|---|---|
|  void | close()Closes random access file. | 
|  long | seek(long offset,
     int seekOrigin)Move current location pointer to the new offset depending on seekOrigin.Note: depending on the archive format and the data size this method may be called from different threads. | 
|  void | setSize(long newSize)Set new size for the out stream. Note: depending on the archive format and the data size this method may be called from different threads. | 
|  int | write(byte[] data)Write databyte array to the stream. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public RandomAccessFileOutStream(java.io.RandomAccessFile randomAccessFile)
randomAccessFile - random access file to use| Method Detail | 
|---|
public long seek(long offset,
                 int seekOrigin)
          throws SevenZipException
seekOrigin.
seek in interface ISeekableStreamoffset - absolute or relative offset in the stream to move toseekOrigin - on of three possible seek origins:ISeekableStream.SEEK_SET - offset is an absolute offset to move to,
            ISeekableStream.SEEK_CUR - offset is a relative offset to the current position in stream,
            ISeekableStream.SEEK_END - offset is an offset from the end of the stream
            (offset <= 0).
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.
public void setSize(long newSize)
             throws SevenZipException
setSize in interface IOutStreamnewSize - new size
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.
public int write(byte[] data)
          throws SevenZipException
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.
write in interface ISequentialOutStreamdata - data to write
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.
public void close()
           throws java.io.IOException
java.io.IOException - see RandomAccessFile.close()| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||