|
||||||||||
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.AbstractRandomAccess
com.imagero.uio.RandomAccessBuffer
Makes possible to represent (multiple) Buffers as RandomAccess
Field Summary |
Fields inherited from interface com.imagero.uio.RandomAccessRO |
BIG_ENDIAN, LITTLE_ENDIAN |
Constructor Summary | |
RandomAccessBuffer(Buffer[] ds,
int byteOrder)
create new RABuffer |
|
RandomAccessBuffer(MutableBufferManager bufferManager,
int byteOrder)
create new RABuffer |
Method Summary | |
protected int |
_read()
|
protected void |
_setByteOrder(int byteOrder)
not all images are tiffs, so we don't throw exception if called from constructor |
void |
close()
sets dirty flag in bufferManager and closes it |
void |
flush()
|
long |
getFilePointer()
Since this is an interface and is not restricted to files, "getFilePointer" is wrong name for this method. |
long |
length()
Returns the data length (please note, that real length is not always known) |
protected boolean |
nextArray()
|
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 pointer offset, measured in bytes from the begin of the data, at which the next read or write occurs. |
void |
setByteOrder(int byteOrder)
set byte order |
void |
setLength(long newLength)
just ignored, no exception is thrown |
int |
skip(int n)
|
void |
write(byte[] b)
Writes max b.length bytes from the specified byte array
to this array, starting at the current array pointer.
|
void |
write(byte[] b,
int off,
int length)
Writes len bytes from the specified byte array
starting at offset off to this RandomAccess. |
void |
write(int b)
Writes the specified byte to this array. |
Methods inherited from class com.imagero.uio.AbstractRandomAccess |
write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF |
Methods inherited from class com.imagero.uio.AbstractRandomAccessRO |
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, skipBytes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.imagero.uio.RandomAccessRO |
getByteOrder, readByteLine, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully |
Methods inherited from interface java.io.DataInput |
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes |
Constructor Detail |
public RandomAccessBuffer(Buffer[] ds, int byteOrder) throws java.io.IOException
java.io.IOException
public RandomAccessBuffer(MutableBufferManager bufferManager, int byteOrder) throws java.io.IOException
bufferManager
-
java.io.IOException
Method Detail |
public int read()
0x00-0x0ff
).
-1
if the end of the file has been reached.protected boolean nextArray()
public long getFilePointer() throws java.io.IOException
RandomAccessRO
java.io.IOException
public void seek(long pos) throws java.io.IOException
pos
- the offset position, measured in bytes from the begin of the data, at which
to set the pointer.
java.io.IOException
public long length()
public void setLength(long newLength) throws java.io.IOException
newLength
- new length of data
java.io.IOException
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 write(byte[] b) throws java.io.IOException
b.length
bytes from the specified byte array
to this array, starting at the current array pointer.
This method doesn't write beyond array bounds,
but off
and length
are not checked.
b
- the data.
java.io.IOException
public void write(byte[] b, int off, int length) throws java.io.IOException
len
bytes from the specified byte array
starting at offset off
to this RandomAccess.off
and length
are not checked.
b
- the data.off
- the start offset in the data.length
- the number of bytes to write
java.io.IOException
- if end of last array reachedpublic void flush() throws java.io.IOException
java.io.IOException
public void setByteOrder(int byteOrder) throws java.io.IOException
RandomAccessRO
setByteOrder
in interface RandomAccessRO
setByteOrder
in class AbstractRandomAccess
java.io.IOException
protected void _setByteOrder(int byteOrder) throws java.io.IOException
AbstractRandomAccess
_setByteOrder
in class AbstractRandomAccess
byteOrder
-
java.io.IOException
public void write(int b) throws java.io.IOException
b
- the byte
to be written.
java.io.IOException
- if end of last array reachedpublic void close()
public int skip(int n) throws java.io.IOException
java.io.IOException
protected int _read() throws java.io.EOFException
_read
in class AbstractRandomAccessRO
java.io.EOFException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |