Package org.gvsig.utils.bigfile
Class BigByteBuffer
java.lang.Object
org.gvsig.utils.bigfile.BigByteBuffer
- Author:
- Fjp Clase para trabajar con ficheros grandes. Mapea solo un trozo de fichero en memoria, y cuando intentas acceder fuera de esa zona, se ocupa de leer automáticamente el trozo que le falta.
-
Constructor Summary
ConstructorsConstructorDescriptionBigByteBuffer(FileChannel fc, FileChannel.MapMode mode) BigByteBuffer(FileChannel fc, FileChannel.MapMode mode, long amountMem) -
Method Summary
Modifier and TypeMethodDescriptioncompact()byteget()get(byte[] dst) byteget(int index) chargetChar()chargetChar(int index) doubledoublegetDouble(int index) floatgetFloat()floatgetFloat(int index) intgetInt()intgetInt(int index) longgetLong()longgetLong(int index) shortgetShort()shortgetShort(int index) booleanisDirect()booleanfinal ByteOrderorder()final ByteBufferfinal longposition()final Bufferposition(long newPosition) put(byte b) put(int index, byte b) putChar(char value) putChar(int index, char value) putDouble(double value) putDouble(int index, double value) putFloat(float value) putFloat(int index, float value) putInt(int value) putInt(int index, int value) putLong(int index, long value) putLong(long value) putShort(int index, short value) putShort(short value) slice()
-
Constructor Details
-
BigByteBuffer
- Throws:
IOException
-
BigByteBuffer
- Throws:
IOException
-
-
Method Details
-
get
public byte get() -
get
-
getChar
public char getChar() -
getDouble
public double getDouble() -
getFloat
public float getFloat() -
getInt
public int getInt() -
getLong
public long getLong() -
getShort
public short getShort() -
isDirect
public boolean isDirect() -
get
public byte get(int index) -
getChar
public char getChar(int index) -
getDouble
public double getDouble(int index) -
getFloat
public float getFloat(int index) -
getInt
public int getInt(int index) -
getLong
public long getLong(int index) -
getShort
public short getShort(int index) -
asReadOnlyBuffer
-
compact
-
duplicate
-
slice
-
put
-
putChar
-
putDouble
-
putFloat
-
putInt
-
put
-
putChar
-
putDouble
-
putFloat
-
putInt
-
putLong
-
putShort
-
putLong
-
putShort
-
asCharBuffer
-
asDoubleBuffer
-
asFloatBuffer
-
asIntBuffer
-
asLongBuffer
-
asShortBuffer
-
isReadOnly
public boolean isReadOnly() -
order
-
order
-
position
public final long position() -
position
-