Package pcap.common.memory.accessor
Class UnalignLEByteAccessor
java.lang.Object
pcap.common.memory.accessor.UnalignLEByteAccessor
- All Implemented Interfaces:
ByteAccessor
@Inclubating public class UnalignLEByteAccessor extends Object
- Author:
- Ardika Rommy Sanjaya
-
Constructor Summary
Constructors Constructor Description UnalignLEByteAccessor()
-
Method Summary
Modifier and Type Method Description byte[]
allocate(int size)
byte
getByte(byte[] buffer, int index)
void
getBytes(byte[] srcBuf, int index, byte[] dstBuf, int dstIndex, int size)
int
getInt(byte[] buffer, int index)
int
getIntLE(byte[] buffer, int index)
long
getLong(byte[] buffer, int index)
long
getLongLE(byte[] buffer, int index)
short
getShort(byte[] buffer, int index)
short
getShortLE(byte[] buffer, int index)
ByteBuffer
nioBuffer(byte[] buffer, int offset, int length)
void
setByte(byte[] buffer, int index, int val)
void
setBytes(byte[] dstBuf, int index, byte[] srcBuf, int srcIndex, int size)
void
setInt(byte[] buffer, int index, int val)
void
setIntLE(byte[] buffer, int index, int val)
void
setLong(byte[] buffer, int index, long val)
void
setLongLE(byte[] buffer, int index, long val)
void
setShort(byte[] buffer, int index, int val)
void
setShortLE(byte[] buffer, int index, int val)
-
Constructor Details
-
UnalignLEByteAccessor
public UnalignLEByteAccessor()
-
-
Method Details
-
getShort
public short getShort(byte[] buffer, int index) -
getShortLE
public short getShortLE(byte[] buffer, int index) -
getInt
public int getInt(byte[] buffer, int index) -
getIntLE
public int getIntLE(byte[] buffer, int index) -
getLong
public long getLong(byte[] buffer, int index) -
getLongLE
public long getLongLE(byte[] buffer, int index) -
setShort
public void setShort(byte[] buffer, int index, int val) -
setShortLE
public void setShortLE(byte[] buffer, int index, int val) -
setInt
public void setInt(byte[] buffer, int index, int val) -
setIntLE
public void setIntLE(byte[] buffer, int index, int val) -
setLong
public void setLong(byte[] buffer, int index, long val) -
setLongLE
public void setLongLE(byte[] buffer, int index, long val) -
allocate
public byte[] allocate(int size)- Specified by:
allocate
in interfaceByteAccessor
-
getByte
public byte getByte(byte[] buffer, int index)- Specified by:
getByte
in interfaceByteAccessor
-
nioBuffer
- Specified by:
nioBuffer
in interfaceByteAccessor
-
getBytes
public void getBytes(byte[] srcBuf, int index, byte[] dstBuf, int dstIndex, int size)- Specified by:
getBytes
in interfaceByteAccessor
-
setByte
public void setByte(byte[] buffer, int index, int val)- Specified by:
setByte
in interfaceByteAccessor
-
setBytes
public void setBytes(byte[] dstBuf, int index, byte[] srcBuf, int srcIndex, int size)- Specified by:
setBytes
in interfaceByteAccessor
-