com.imagero.uio
Interface ISeekable

All Known Subinterfaces:
OSeekable, RandomAccessInput, RandomAccessIO, RandomAccessOutput
All Known Implementing Classes:
AbstractRandomAccessInput, AbstractRandomAccessIO, AbstractRandomAccessOutput, ByteArrayRandomAccessIO

public interface ISeekable

This interface contains methods useful both for input and output, but itself cannot be clasified neither as input nor as output. The name "ISeekable" is rather misleading.


Field Summary
static int BIG_ENDIAN
           
static int LITTLE_ENDIAN
           
 
Method Summary
 void close()
           
 int getByteOrder()
          get byte order
 long getFilePointer()
          Since this is an interface and is not restricted to files, "getFilePointer" is wrong name for this method.
 boolean isBuffered()
           
 long length()
          get length of data
 void seek(long offset)
          set current cursor position to specified offset
 void setByteOrder(int byteOrder)
          set byte order
 

Field Detail

BIG_ENDIAN

public static final int BIG_ENDIAN
See Also:
Constant Field Values

LITTLE_ENDIAN

public static final int LITTLE_ENDIAN
See Also:
Constant Field Values
Method Detail

getByteOrder

public int getByteOrder()
get byte order

Returns:
#BIG_ENDIAN or #LITTLE_ENDIAN
See Also:
BIG_ENDIAN, LITTLE_ENDIAN

setByteOrder

public void setByteOrder(int byteOrder)
set byte order

Parameters:
byteOrder -
See Also:
BIG_ENDIAN, LITTLE_ENDIAN

getFilePointer

public long getFilePointer()
                    throws java.io.IOException
Since this is an interface and is not restricted to files, "getFilePointer" is wrong name for this method. But I leaved it so for easier porting from RandomAccessFile

Returns:
current cursor position
Throws:
java.io.IOException

length

public long length()
            throws java.io.IOException
get length of data

Returns:
data length (in bytes)
Throws:
java.io.IOException

seek

public void seek(long offset)
          throws java.io.IOException
set current cursor position to specified offset

Parameters:
offset - new cursor position
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

isBuffered

public boolean isBuffered()