Class BytesBlock
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.processor.BytesBlock
Represent a block of bytes, with support for byte ordering within byte groups of 16- 32- or
64-bits.
-
Constructor Summary
ConstructorsConstructorDescriptionBytesBlock(byte[] code) Create a block of ungrouped bytes.BytesBlock(byte[] code, Endianness endianness, int groupSize) Create a block. -
Method Summary
-
Constructor Details
-
BytesBlock
public BytesBlock(byte[] code) Create a block of ungrouped bytes.- Parameters:
code- bytes
-
BytesBlock
Create a block.- Parameters:
code- bytesendianness- order which should be used to read codegroupSize- byte size to consider to swap between BE and LE (2 for 16bits swap, 4 for 32bits swap...)
-
-
Method Details
-
getCode
public byte[] getCode()Get the bytes in their original byte order.- Returns:
- original bytes
-
getCode
Get the bytes for a requested byte order.- Parameters:
byteOrder- requested byte order- Returns:
- bytes in the requested order
-
getBECode
public byte[] getBECode()Get the bytes in big-endian order.- Returns:
- big-endian bytes
-
getLECode
public byte[] getLECode()Get the bytes in little-endian order.- Returns:
- little-endian bytes
-
hashCode
public int hashCode() -
equals
-