org.biojava.utils.io
Class LargeBuffer
java.lang.Object
org.biojava.utils.io.LargeBuffer
public class LargeBuffer
- extends Object
Wrapper arround MappedByteBuffers to allow long-indexed access to files
larger than 2 gigs.
- Author:
- Matthews Pocock
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LargeBuffer
public LargeBuffer(FileChannel channel,
FileChannel.MapMode mode,
long pos,
long size)
throws IOException
- Throws:
IOException
get
public byte get(long pos)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
get
public byte get()
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
put
public void put(long pos,
byte b)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
put
public void put(byte val)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getChar
public char getChar(long pos)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getChar
public char getChar()
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putChar
public void putChar(long pos,
char c)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putChar
public void putChar(char val)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getDouble
public double getDouble(long pos)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getDouble
public double getDouble()
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putDouble
public void putDouble(long pos,
double d)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putDouble
public void putDouble(double val)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getFloat
public float getFloat(long pos)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getFloat
public float getFloat()
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putFloat
public void putFloat(long pos,
float f)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putFloat
public void putFloat(float val)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getInt
public int getInt(long pos)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getInt
public int getInt()
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putInt
public void putInt(long pos,
int i)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putInt
public void putInt(int val)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getLong
public long getLong(long pos)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getLong
public long getLong()
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putLong
public void putLong(long pos,
long l)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putLong
public void putLong(long val)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getShort
public short getShort(long pos)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
getShort
public short getShort()
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putShort
public void putShort(long pos,
short s)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
putShort
public void putShort(short val)
throws IndexOutOfBoundsException,
IOException
- Throws:
IndexOutOfBoundsException
IOException
position
public long position()
position
public void position(long pos)
force
public void force()