org.ujmp.core.util.io
Class WeakMappedByteBuffer
- java.lang.Object
-
- org.ujmp.core.util.io.WeakMappedByteBuffer
-
public class WeakMappedByteBuffer extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field and Description static intDEFAULTBUFFERSIZE
-
Constructor Summary
Constructors Constructor and Description WeakMappedByteBuffer(java.nio.channels.FileChannel fileChannel, java.nio.channels.FileChannel.MapMode mapMode, long pos, int size)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.nio.CharBufferasCharBuffer()java.nio.DoubleBufferasDoubleBuffer()java.nio.FloatBufferasFloatBuffer()java.nio.IntBufferasIntBuffer()java.nio.LongBufferasLongBuffer()java.nio.ByteBufferasReadOnlyBuffer()java.nio.ShortBufferasShortBuffer()longcapacity()java.nio.ByteBuffercompact()static WeakMappedByteBuffer[]create(java.io.RandomAccessFile randomAccessFile)java.nio.ByteBufferduplicate()byteget()voidget(byte[] dst, int offset, int length)byteget(int index)chargetChar()chargetChar(int index)doublegetDouble()doublegetDouble(int index)floatgetFloat()floatgetFloat(int index)intgetInt()intgetInt(int index)longgetLong()longgetLong(int index)java.nio.ByteBuffergetOrCreateByteBuffer()shortgetShort()shortgetShort(int index)booleanisDirect()booleanisReadOnly()voidposition(int offset)java.nio.ByteBufferput(byte b)voidput(byte[] bytes, int offset, int length)java.nio.ByteBufferput(int index, byte b)java.nio.ByteBufferputChar(char value)java.nio.ByteBufferputChar(int index, char value)java.nio.ByteBufferputDouble(double value)java.nio.ByteBufferputDouble(int index, double value)java.nio.ByteBufferputFloat(float value)java.nio.ByteBufferputFloat(int index, float value)java.nio.ByteBufferputInt(int value)java.nio.ByteBufferputInt(int index, int value)java.nio.ByteBufferputLong(int index, long value)java.nio.ByteBufferputLong(long value)java.nio.ByteBufferputShort(int index, short value)java.nio.ByteBufferputShort(short value)java.nio.Bufferreset()java.nio.Bufferrewind()java.nio.ByteBufferslice()
-
-
-
Field Detail
-
DEFAULTBUFFERSIZE
public static final int DEFAULTBUFFERSIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WeakMappedByteBuffer
public WeakMappedByteBuffer(java.nio.channels.FileChannel fileChannel, java.nio.channels.FileChannel.MapMode mapMode, long pos, int size)
-
-
Method Detail
-
create
public static final WeakMappedByteBuffer[] create(java.io.RandomAccessFile randomAccessFile) throws java.io.IOException
- Throws:
java.io.IOException
-
getOrCreateByteBuffer
public java.nio.ByteBuffer getOrCreateByteBuffer()
-
slice
public java.nio.ByteBuffer slice()
-
duplicate
public java.nio.ByteBuffer duplicate()
-
asReadOnlyBuffer
public java.nio.ByteBuffer asReadOnlyBuffer()
-
get
public byte get()
-
put
public java.nio.ByteBuffer put(byte b)
-
get
public byte get(int index)
-
put
public java.nio.ByteBuffer put(int index, byte b)
-
compact
public java.nio.ByteBuffer compact()
-
isDirect
public boolean isDirect()
-
getChar
public char getChar()
-
putChar
public java.nio.ByteBuffer putChar(char value)
-
getChar
public char getChar(int index)
-
putChar
public java.nio.ByteBuffer putChar(int index, char value)
-
asCharBuffer
public java.nio.CharBuffer asCharBuffer()
-
getShort
public short getShort()
-
putShort
public java.nio.ByteBuffer putShort(short value)
-
getShort
public short getShort(int index)
-
putShort
public java.nio.ByteBuffer putShort(int index, short value)
-
asShortBuffer
public java.nio.ShortBuffer asShortBuffer()
-
getInt
public int getInt()
-
putInt
public java.nio.ByteBuffer putInt(int value)
-
getInt
public int getInt(int index)
-
putInt
public java.nio.ByteBuffer putInt(int index, int value)
-
asIntBuffer
public java.nio.IntBuffer asIntBuffer()
-
getLong
public long getLong()
-
putLong
public java.nio.ByteBuffer putLong(long value)
-
getLong
public long getLong(int index)
-
putLong
public java.nio.ByteBuffer putLong(int index, long value)
-
asLongBuffer
public java.nio.LongBuffer asLongBuffer()
-
getFloat
public float getFloat()
-
putFloat
public java.nio.ByteBuffer putFloat(float value)
-
getFloat
public float getFloat(int index)
-
putFloat
public java.nio.ByteBuffer putFloat(int index, float value)
-
asFloatBuffer
public java.nio.FloatBuffer asFloatBuffer()
-
getDouble
public double getDouble()
-
putDouble
public java.nio.ByteBuffer putDouble(double value)
-
getDouble
public double getDouble(int index)
-
putDouble
public java.nio.ByteBuffer putDouble(int index, double value)
-
asDoubleBuffer
public java.nio.DoubleBuffer asDoubleBuffer()
-
isReadOnly
public boolean isReadOnly()
-
capacity
public long capacity()
-
position
public void position(int offset)
-
put
public void put(byte[] bytes, int offset, int length)
-
get
public void get(byte[] dst, int offset, int length)
-
rewind
public java.nio.Buffer rewind()
-
reset
public java.nio.Buffer reset()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG