org.garret.perst
Interface RandomAccessStream

All Known Implementing Classes:
RandomAccessInputStream, RandomAccessOutputStream

public interface RandomAccessStream

This interface extends nomal Java streams with seek capability. This interface is implemented by Perst BLOB streams


Method Summary
 long getPosition()
          Get current position in the stream
 long setPosition(long pos)
          Set position in the stream
 long size()
          Get size of the stream
 

Method Detail

getPosition

long getPosition()
Get current position in the stream

Returns:
current poistion in the stream

setPosition

long setPosition(long pos)
Set position in the stream

Parameters:
pos - new absolute poistion in the strwam
Returns:
actual position - it can be less than specified if end of stream is reached

size

long size()
Get size of the stream

Returns:
number of bytes available in the stream