com.sentilla.io
Interface DataRandomAccess

All Superinterfaces:
DataInput, DataOutput, Input, Output
All Known Subinterfaces:
ObjectRandomAccess, RandomAccessFile
All Known Implementing Classes:
RemoteRandomAccessFile

public interface DataRandomAccess
extends DataInput, DataOutput

Provides methods to access a DataInput/Output media at random positions.


Method Summary
 int getOffset()
          Get the seek position in the media.
 int length()
          Get length of the media.
 void seek(int offset)
          Set the seek position in the media.
 
Methods inherited from interface com.sentilla.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readInt, readLong, readShort, readUnsignedByte, readUTF
 
Methods inherited from interface com.sentilla.io.Input
close, read, read, read, skip
 
Methods inherited from interface com.sentilla.io.DataOutput
writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from interface com.sentilla.io.Output
close, flush, write, write, write
 

Method Detail

getOffset

int getOffset()
Get the seek position in the media.

Returns:
byte index.

length

int length()
Get length of the media.

Returns:
total number of bytes.

seek

void seek(int offset)
Set the seek position in the media. Subsequent read/write will be performed at this position.

Parameters:
offset - byte index to seek to.


Copyright © 2007 Sentilla Corporation. All Rights Reserved.