com.imagero.uio.buffer
Class RAFBufferRO
java.lang.Object
com.imagero.uio.buffer.RAFBufferRO
- All Implemented Interfaces:
- Buffer
- Direct Known Subclasses:
- RAFBuffer
- public class RAFBufferRO
- extends java.lang.Object
- implements Buffer
Implementation of Buffer for RandomAccessRO.
Field Summary |
protected java.io.RandomAccessFile |
raf
|
Constructor Summary |
RAFBufferRO(java.io.RandomAccessFile raf,
long offset,
int length)
|
Method Summary |
byte[] |
getData()
read specified part of data |
byte[] |
getData(byte[] d)
copy data to supplied byte array |
boolean |
isDirty()
|
int |
length()
get length of data |
protected void |
readData()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
raf
protected java.io.RandomAccessFile raf
RAFBufferRO
public RAFBufferRO(java.io.RandomAccessFile raf,
long offset,
int length)
getData
public byte[] getData()
throws java.io.IOException
- read specified part of data
- Specified by:
getData
in interface Buffer
- Returns:
- data
- Throws:
java.io.IOException
getData
public byte[] getData(byte[] d)
throws java.io.IOException
- Description copied from interface:
Buffer
- copy data to supplied byte array
- Specified by:
getData
in interface Buffer
- Parameters:
d
- destination array
- Returns:
- byte array
- Throws:
java.io.IOException
length
public int length()
- Description copied from interface:
Buffer
- get length of data
- Specified by:
length
in interface Buffer
- Returns:
- length of data
readData
protected void readData()
throws java.io.IOException
- Throws:
java.io.IOException
isDirty
public boolean isDirty()
- Specified by:
isDirty
in interface Buffer