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

Quick Search    Search Deep

com.imagero.uio
Class RandomAccessFileWrapperRO  view RandomAccessFileWrapperRO download RandomAccessFileWrapperRO.java

java.lang.Object
  extended bycom.imagero.uio.AbstractRandomAccessRO
      extended bycom.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.


Nested Class Summary
 
Nested classes inherited from class com.imagero.uio.AbstractRandomAccessRO
AbstractRandomAccessRO.DataInputBE, AbstractRandomAccessRO.DataInputLE
 
Field Summary
protected  java.io.RandomAccessFile in
           
 
Fields inherited from class com.imagero.uio.AbstractRandomAccessRO
byteOrder, dataInput
 
Fields inherited from interface com.imagero.uio.RandomAccessRO
BIG_ENDIAN, LITTLE_ENDIAN
 
Constructor Summary
RandomAccessFileWrapperRO(java.io.RandomAccessFile in, int byteOrder)
           
 
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
 

Field Detail

in

protected java.io.RandomAccessFile in
Constructor Detail

RandomAccessFileWrapperRO

public RandomAccessFileWrapperRO(java.io.RandomAccessFile in,
                                 int byteOrder)
                          throws java.io.IOException
Method Detail

_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