Package pcap.common.memory.accessor
Interface ByteAccessor
- All Known Implementing Classes:
AlignByteAccessor
,UnalignBEByteAccessor
,UnalignLEByteAccessor
@Inclubating public interface ByteAccessor
- Author:
- Ardika Rommy Sanjaya
-
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)
-
Method Details
-
allocate
byte[] allocate(int size) -
nioBuffer
-
getByte
byte getByte(byte[] buffer, int index) -
getShort
short getShort(byte[] buffer, int index) -
getShortLE
short getShortLE(byte[] buffer, int index) -
getInt
int getInt(byte[] buffer, int index) -
getIntLE
int getIntLE(byte[] buffer, int index) -
getLong
long getLong(byte[] buffer, int index) -
getLongLE
long getLongLE(byte[] buffer, int index) -
getBytes
void getBytes(byte[] srcBuf, int index, byte[] dstBuf, int dstIndex, int size) -
setByte
void setByte(byte[] buffer, int index, int val) -
setShort
void setShort(byte[] buffer, int index, int val) -
setShortLE
void setShortLE(byte[] buffer, int index, int val) -
setInt
void setInt(byte[] buffer, int index, int val) -
setIntLE
void setIntLE(byte[] buffer, int index, int val) -
setLong
void setLong(byte[] buffer, int index, long val) -
setLongLE
void setLongLE(byte[] buffer, int index, long val) -
setBytes
void setBytes(byte[] dstBuf, int index, byte[] srcBuf, int srcIndex, int size)
-