krati.io
Class MappedReader

java.lang.Object
  extended by krati.io.MappedReader
All Implemented Interfaces:
DataReader

public class MappedReader
extends Object
implements DataReader


Constructor Summary
MappedReader(File file)
           
 
Method Summary
 void close()
           
 File getFile()
           
 void open()
           
 long position()
           
 void position(long newPosition)
           
 int readInt()
           
 int readInt(long position)
           
 long readLong()
           
 long readLong(long position)
           
 short readShort()
           
 short readShort(long position)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappedReader

public MappedReader(File file)
Method Detail

getFile

public File getFile()
Specified by:
getFile in interface DataReader

open

public void open()
          throws IOException
Specified by:
open in interface DataReader
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface DataReader
Throws:
IOException

readInt

public int readInt()
            throws IOException
Specified by:
readInt in interface DataReader
Throws:
IOException

readLong

public long readLong()
              throws IOException
Specified by:
readLong in interface DataReader
Throws:
IOException

readShort

public short readShort()
                throws IOException
Specified by:
readShort in interface DataReader
Throws:
IOException

readInt

public int readInt(long position)
            throws IOException
Specified by:
readInt in interface DataReader
Throws:
IOException

readLong

public long readLong(long position)
              throws IOException
Specified by:
readLong in interface DataReader
Throws:
IOException

readShort

public short readShort(long position)
                throws IOException
Specified by:
readShort in interface DataReader
Throws:
IOException

position

public long position()
              throws IOException
Specified by:
position in interface DataReader
Throws:
IOException

position

public void position(long newPosition)
              throws IOException
Specified by:
position in interface DataReader
Throws:
IOException


Copyright © 2011. All Rights Reserved.