|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.imagero.uio.AbstractRandomAccessRO
com.imagero.uio.RandomAccessByteArrayRO
Makes possible to access byte array as RandomAccessRO
Field Summary |
Fields inherited from interface com.imagero.uio.RandomAccessRO |
BIG_ENDIAN, LITTLE_ENDIAN |
Constructor Summary | |
RandomAccessByteArrayRO(byte[] data,
int byteOrder)
create new RandomAccessByteArray |
|
RandomAccessByteArrayRO(byte[] data,
int off,
int length,
int byteOrder)
create new RandomAccessByteArray |
Method Summary | |
protected int |
_read()
|
void |
close()
does nothing |
long |
getFilePointer()
Since this is an interface and is not restricted to files, "getFilePointer" is wrong name for this method. |
protected int |
getOffset()
|
long |
length()
Returns the length of this byte array. |
int |
read()
Reads a byte of data from this byte array. |
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int length)
|
void |
seek(long pos)
Sets the array-pointer offset, measured from the beginning of this byte array, at which the next read or write occurs. |
protected void |
setOffset(int 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 |
Constructor Detail |
public RandomAccessByteArrayRO(byte[] data, int byteOrder) throws java.io.IOException
data
- byte array
java.io.IOException
public RandomAccessByteArrayRO(byte[] data, int off, int length, int byteOrder) throws java.io.IOException
data
- byte arrayoff
- index of the first bytelength
- number of bytes
java.io.IOException
Method Detail |
public int read()
0x00-0x0ff
).
-1
if the end of the file has been reached.protected int _read() throws java.io.EOFException
_read
in class AbstractRandomAccessRO
java.io.EOFException
public int read(byte[] b) throws java.io.IOException
java.io.IOException
public int read(byte[] b, int off, int length) throws java.io.IOException
java.io.IOException
public void close()
protected int getOffset()
protected void setOffset(int offset)
public int skip(int n) throws java.io.IOException
java.io.IOException
public long getFilePointer() throws java.io.IOException
RandomAccessRO
java.io.IOException
public void seek(long pos)
pos
- the offset position, measured in bytes from the beginning of the byte array, at which
to set the array pointer.public long length()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |