Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.imagero.uio.buffer
Class RAFBufferRO  view RAFBufferRO download RAFBufferRO.java

java.lang.Object
  extended bycom.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
(package private)  byte[] data
           
(package private)  int length
           
(package private)  long offset
           
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
 

Field Detail

raf

protected java.io.RandomAccessFile raf

offset

long offset

length

int length

data

byte[] data
Constructor Detail

RAFBufferRO

public RAFBufferRO(java.io.RandomAccessFile raf,
                   long offset,
                   int length)
Method Detail

getData

public byte[] getData()
               throws java.io.IOException
read specified part of data

Specified by:
getData in interface Buffer

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

length

public int length()
Description copied from interface: Buffer
get length of data

Specified by:
length in interface Buffer

readData

protected void readData()
                 throws java.io.IOException

isDirty

public boolean isDirty()
Specified by:
isDirty in interface Buffer