com.imagero.uio
Class RandomAccessFileWrapperRO

java.lang.Object
com.imagero.uio.AbstractRandomAccessRO
com.imagero.uio.RandomAccessFileWrapperRO
- All Implemented Interfaces:
- java.io.DataInput, Input, RandomAccessRO
- public class RandomAccessFileWrapperRO
- extends AbstractRandomAccessRO
wrap RandomAccessFile in RandomAccessRO
Attention - this class is not buffered.
That means if you make extensive use of readInt, readLong, readChar, ...,
then performance will be pretty poor. Use buffered classes instead.
|
Method Summary |
protected int |
_read()
|
void |
close()
|
long |
getFilePointer()
Since this is an interface and is not restricted to files, "getFilePointer" is wrong name for this method. |
long |
length()
get length of data |
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
void |
seek(long pos)
set current cursor position to specified offset |
int |
skip(int n)
|
| Methods inherited from class com.imagero.uio.AbstractRandomAccessRO |
_setByteOrder, getByteOrder, readBoolean, readByte, readByteLine, readByteOrder, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, setByteOrder, skipBytes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
protected java.io.RandomAccessFile in
RandomAccessFileWrapperRO
public RandomAccessFileWrapperRO(java.io.RandomAccessFile in,
int byteOrder)
throws java.io.IOException
_read
protected int _read()
throws java.io.IOException
- Specified by:
_read in class AbstractRandomAccessRO
skip
public int skip(int n)
throws java.io.IOException
read
public int read()
throws java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read
public int read(byte[] b)
throws java.io.IOException
getFilePointer
public long getFilePointer()
throws java.io.IOException
- Description copied from interface:
RandomAccessRO
- 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
seek
public void seek(long pos)
throws java.io.IOException
- Description copied from interface:
RandomAccessRO
- set current cursor position to specified
offset
length
public long length()
throws java.io.IOException
- Description copied from interface:
RandomAccessRO
- get length of data
close
public void close()
throws java.io.IOException