Class ByteBufferBasicBytez
java.lang.Object
org.nustaq.offheap.bytez.niobuffers.ByteBufferBasicBytez
- All Implemented Interfaces:
BasicBytez
,ByteSink
,ByteSource
Created by moelrue on 5/5/15.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copyTo
(BasicBytez other, long otherByteIndex, long myByteIndex, long lenBytes) byte
get
(long byteIndex) void
getArr
(long byteIndex, byte[] target, int elemoff, int numElems) copy to a byte arrayboolean
getBool
(long byteIndex) void
getBooleanArr
(long byteIndex, boolean[] target, int elemoff, int numElems) see getArrchar
getChar
(long byteIndex) void
getCharArr
(long byteIndex, char[] target, int elemoff, int numElems) see getArrdouble
getDouble
(long byteIndex) void
getDoubleArr
(long byteIndex, double[] target, int elemoff, int numElems) see getArrfloat
getFloat
(long byteIndex) void
getFloatArr
(long byteIndex, float[] target, int elemoff, int numElems) see getArrint
getInt
(long byteIndex) void
getIntArr
(long byteIndex, int[] target, int elemoff, int numElems) see getArrlong
getLong
(long byteIndex) void
getLongArr
(long byteIndex, long[] target, int elemoff, int numElems) see getArrshort
getShort
(long byteIndex) void
getShortArr
(long byteIndex, short[] target, int elemoff, int numElems) see getArrlong
length()
newInstance
(long size) void
put
(long byteIndex, byte value) void
putBool
(long byteIndex, boolean val) void
putChar
(long byteIndex, char c) void
putDouble
(long byteIndex, double d) void
putFloat
(long byteIndex, float f) void
putInt
(long byteIndex, int i) void
putLong
(long byteIndex, long l) void
putShort
(long byteIndex, short s) void
set
(long byteIndex, byte[] source, int elemoff, int numElems) void
setBoolean
(long byteIndex, boolean[] source, int elemoff, int siz) void
setBuffer
(ByteBuffer buffer) void
setChar
(long byteIndex, char[] source, int elemoff, int numElems) void
setDouble
(long byteIndex, double[] source, int elemoff, int numElems) void
setFloat
(long byteIndex, float[] source, int elemoff, int numElems) void
setInt
(long byteIndex, int[] source, int elemoff, int numElems) void
setLong
(long byteIndex, long[] source, int elemoff, int numElems) void
setShort
(long byteIndex, short[] source, int elemoff, int numElems)
-
Constructor Details
-
ByteBufferBasicBytez
-
-
Method Details
-
get
public byte get(long byteIndex) - Specified by:
get
in interfaceBasicBytez
- Specified by:
get
in interfaceByteSource
-
getBool
public boolean getBool(long byteIndex) - Specified by:
getBool
in interfaceBasicBytez
-
getChar
public char getChar(long byteIndex) - Specified by:
getChar
in interfaceBasicBytez
-
getShort
public short getShort(long byteIndex) - Specified by:
getShort
in interfaceBasicBytez
-
getInt
public int getInt(long byteIndex) - Specified by:
getInt
in interfaceBasicBytez
-
getLong
public long getLong(long byteIndex) - Specified by:
getLong
in interfaceBasicBytez
-
getFloat
public float getFloat(long byteIndex) - Specified by:
getFloat
in interfaceBasicBytez
-
getDouble
public double getDouble(long byteIndex) - Specified by:
getDouble
in interfaceBasicBytez
-
put
public void put(long byteIndex, byte value) - Specified by:
put
in interfaceBasicBytez
- Specified by:
put
in interfaceByteSink
-
putBool
public void putBool(long byteIndex, boolean val) - Specified by:
putBool
in interfaceBasicBytez
-
putChar
public void putChar(long byteIndex, char c) - Specified by:
putChar
in interfaceBasicBytez
-
putShort
public void putShort(long byteIndex, short s) - Specified by:
putShort
in interfaceBasicBytez
-
putInt
public void putInt(long byteIndex, int i) - Specified by:
putInt
in interfaceBasicBytez
-
putLong
public void putLong(long byteIndex, long l) - Specified by:
putLong
in interfaceBasicBytez
-
putFloat
public void putFloat(long byteIndex, float f) - Specified by:
putFloat
in interfaceBasicBytez
-
putDouble
public void putDouble(long byteIndex, double d) - Specified by:
putDouble
in interfaceBasicBytez
-
length
public long length()- Specified by:
length
in interfaceBasicBytez
- Specified by:
length
in interfaceByteSink
- Specified by:
length
in interfaceByteSource
-
getArr
public void getArr(long byteIndex, byte[] target, int elemoff, int numElems) Description copied from interface:BasicBytez
copy to a byte array- Specified by:
getArr
in interfaceBasicBytez
- Parameters:
byteIndex
- - offset index in this buffer to start copyingtarget
- - array to copy toelemoff
- - offset in target arraynumElems
- - length to copy to
-
getCharArr
public void getCharArr(long byteIndex, char[] target, int elemoff, int numElems) Description copied from interface:BasicBytez
see getArr- Specified by:
getCharArr
in interfaceBasicBytez
-
getShortArr
public void getShortArr(long byteIndex, short[] target, int elemoff, int numElems) Description copied from interface:BasicBytez
see getArr- Specified by:
getShortArr
in interfaceBasicBytez
-
getIntArr
public void getIntArr(long byteIndex, int[] target, int elemoff, int numElems) Description copied from interface:BasicBytez
see getArr- Specified by:
getIntArr
in interfaceBasicBytez
-
getLongArr
public void getLongArr(long byteIndex, long[] target, int elemoff, int numElems) Description copied from interface:BasicBytez
see getArr- Specified by:
getLongArr
in interfaceBasicBytez
-
getFloatArr
public void getFloatArr(long byteIndex, float[] target, int elemoff, int numElems) Description copied from interface:BasicBytez
see getArr- Specified by:
getFloatArr
in interfaceBasicBytez
-
getDoubleArr
public void getDoubleArr(long byteIndex, double[] target, int elemoff, int numElems) Description copied from interface:BasicBytez
see getArr- Specified by:
getDoubleArr
in interfaceBasicBytez
-
getBooleanArr
public void getBooleanArr(long byteIndex, boolean[] target, int elemoff, int numElems) Description copied from interface:BasicBytez
see getArr- Specified by:
getBooleanArr
in interfaceBasicBytez
-
set
public void set(long byteIndex, byte[] source, int elemoff, int numElems) - Specified by:
set
in interfaceBasicBytez
-
setChar
public void setChar(long byteIndex, char[] source, int elemoff, int numElems) - Specified by:
setChar
in interfaceBasicBytez
-
setShort
public void setShort(long byteIndex, short[] source, int elemoff, int numElems) - Specified by:
setShort
in interfaceBasicBytez
-
setInt
public void setInt(long byteIndex, int[] source, int elemoff, int numElems) - Specified by:
setInt
in interfaceBasicBytez
-
setLong
public void setLong(long byteIndex, long[] source, int elemoff, int numElems) - Specified by:
setLong
in interfaceBasicBytez
-
setFloat
public void setFloat(long byteIndex, float[] source, int elemoff, int numElems) - Specified by:
setFloat
in interfaceBasicBytez
-
setDouble
public void setDouble(long byteIndex, double[] source, int elemoff, int numElems) - Specified by:
setDouble
in interfaceBasicBytez
-
setBoolean
public void setBoolean(long byteIndex, boolean[] source, int elemoff, int siz) - Specified by:
setBoolean
in interfaceBasicBytez
-
copyTo
- Specified by:
copyTo
in interfaceBasicBytez
- Specified by:
copyTo
in interfaceByteSink
-
newInstance
- Specified by:
newInstance
in interfaceBasicBytez
-
getBuffer
-
setBuffer
-