net.sf.sevenzipjbinding
Interface IInStream

All Superinterfaces:
ISequentialInStream
All Known Implementing Classes:
RandomAccessFileInStream, VolumedArchiveInStream

public interface IInStream
extends ISequentialInStream

InStream interface used to operate with seeable input stream

Version:
4.65-1
Author:
Boris Brodski

Field Summary
static int SEEK_CUR
          Indicates, that the seek operation should be done from the current position (file pointer) of the stream.
static int SEEK_END
          Indicates, that the seek operation should be done from the end of the stream.
static int SEEK_SET
          Indicates, that the seek operation should be done from the beginning of the stream
 
Method Summary
 long seek(long offset, int seekOrigin)
          Move current location pointer to the new offset depending on seekOrigin
 
Methods inherited from interface net.sf.sevenzipjbinding.ISequentialInStream
read
 

Field Detail

SEEK_SET

static final int SEEK_SET
Indicates, that the seek operation should be done from the beginning of the stream

See Also:
Constant Field Values

SEEK_CUR

static final int SEEK_CUR
Indicates, that the seek operation should be done from the current position (file pointer) of the stream. Positive values move file pointer forward.

See Also:
Constant Field Values

SEEK_END

static final int SEEK_END
Indicates, that the seek operation should be done from the end of the stream. Positive offset values move file pointer over the end of the stream. For the read only streams it's equivalent reaching end of the stream while reading.

See Also:
Constant Field Values
Method Detail

seek

long seek(long offset,
          int seekOrigin)
          throws SevenZipException
Move current location pointer to the new offset depending on seekOrigin

Parameters:
offset - absolute or relative offset in the stream to move to
seekOrigin - on of three possible seek origins:
  • SEEK_SET - offset is an absolute offset to move to,
  • SEEK_CUR - offset is a relative offset to the current position in stream,
  • SEEK_END - offset is an offset from the end of the stream (offset <= 0).
    Returns:
    new absolute position in the 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 are no guarantee, that there are no further call back methods will be called. The first thrown exception will be saved and thrown late on from the first called 7-Zip-JBinding main method, such as ISevenZipInArchive.extract() or SevenZip.openInArchive().