Package ghidra.util
Interface GhidraDataConverter
-
- All Superinterfaces:
DataConverter
,java.io.Serializable
- All Known Implementing Classes:
GhidraBigEndianDataConverter
,GhidraLittleEndianDataConverter
public interface GhidraDataConverter extends DataConverter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.math.BigInteger
getBigInteger(MemBuffer buf, int offset, int size, boolean signed)
Generate a little-endian BigInteger value by invoking buf.getBytes at the specified offset.int
getInt(MemBuffer buf, int offset)
Generate a little-endian int value by invoking buf.getBytes at the specified offset.long
getLong(MemBuffer buf, int offset)
Generate a little-endian long value by invoking buf.getBytes at the specified offset.short
getShort(MemBuffer buf, int offset)
Generate a little-endian short value by invoking buf.getBytes at the specified offset.-
Methods inherited from interface ghidra.util.DataConverter
getBigInteger, getBigInteger, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getInt, getInt, getLong, getLong, getShort, getShort, getValue, getValue, putBigInteger, putBigInteger, putInt, putInt, putLong, putLong, putShort, putShort
-
-
-
-
Method Detail
-
getShort
short getShort(MemBuffer buf, int offset) throws MemoryAccessException
Generate a little-endian short value by invoking buf.getBytes at the specified offset.- Parameters:
buf
-offset
-- Returns:
- little-endian short value
- Throws:
MemoryAccessException
- if failed to read 2-bytes at the specified offset
-
getInt
int getInt(MemBuffer buf, int offset) throws MemoryAccessException
Generate a little-endian int value by invoking buf.getBytes at the specified offset.- Parameters:
buf
-offset
-- Returns:
- little-endian int value
- Throws:
MemoryAccessException
- if failed to read 4-bytes at the specified offset
-
getLong
long getLong(MemBuffer buf, int offset) throws MemoryAccessException
Generate a little-endian long value by invoking buf.getBytes at the specified offset.- Parameters:
buf
-offset
-- Returns:
- little-endian long value
- Throws:
MemoryAccessException
- if failed to read 8-bytes at the specified offset
-
getBigInteger
java.math.BigInteger getBigInteger(MemBuffer buf, int offset, int size, boolean signed) throws MemoryAccessException
Generate a little-endian BigInteger value by invoking buf.getBytes at the specified offset.- Parameters:
buf
-offset
-- Returns:
- little-endian BigInteger value
- Throws:
MemoryAccessException
- if failed to read specified number of bytes at the specified offset
-
-