Package ghidra.util

# Class GhidraBigEndianDataConverter

java.lang.Object
ghidra.util.BigEndianDataConverter
ghidra.util.GhidraBigEndianDataConverter

All Implemented Interfaces:
  `DataConverter`, `GhidraDataConverter`, `Serializable`

public class GhidraBigEndianDataConverter extends BigEndianDataConverter implements GhidraDataConverter

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final GhidraBigEndianDataConverter`
  `INSTANCE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GhidraBigEndianDataConverter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final BigInteger`
  `getBigInteger(MemBuffer buf, int offset, int size, boolean signed)`
  Generate a BigInteger value by invoking buf.getBytes at the specified offset.
  `final int`
  `getInt(MemBuffer buf, int offset)`
  Generate a int value by invoking buf.getBytes at the specified offset.
  `final long`
  `getLong(MemBuffer buf, int offset)`
  Generate a long value by invoking buf.getBytes at the specified offset.
  `final short`
  `getShort(MemBuffer buf, int offset)`
  Generate a short value by invoking buf.getBytes at the specified offset.

  ### Methods inherited from class ghidra.util.BigEndianDataConverter

  `getBigInteger, getInt, getLong, getShort, getValue, putBigInteger, putInt, putShort, putValue`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### 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, getSignedValue, getSignedValue, getValue, getValue, isBigEndian, putBigInteger, putBigInteger, putInt, putInt, putLong, putLong, putShort, putShort, putValue`

- ## Field Details

  - ### INSTANCE

    public static final GhidraBigEndianDataConverter INSTANCE

- ## Constructor Details

  - ### GhidraBigEndianDataConverter

    public GhidraBigEndianDataConverter()

- ## Method Details

  - ### getShort

    public final short getShort(MemBuffer buf, int offset) throws MemoryAccessException
    Description copied from interface: `GhidraDataConverter`
    Generate a short value by invoking buf.getBytes at the specified offset.
    Specified by:
      `getShort` in interface `GhidraDataConverter`
    Parameters:
      `buf` - MemBuffer source of bytes
      `offset` - offset in mem buffer to read
    Returns:
      short value
    Throws:
      `MemoryAccessException` - if failed to read 2-bytes at the specified offset

  - ### getInt

    public final int getInt(MemBuffer buf, int offset) throws MemoryAccessException
    Description copied from interface: `GhidraDataConverter`
    Generate a int value by invoking buf.getBytes at the specified offset.
    Specified by:
      `getInt` in interface `GhidraDataConverter`
    Parameters:
      `buf` - MemBuffer source of bytes
      `offset` - offset in mem buffer to read
    Returns:
      int value
    Throws:
      `MemoryAccessException` - if failed to read 4-bytes at the specified offset

  - ### getLong

    public final long getLong(MemBuffer buf, int offset) throws MemoryAccessException
    Description copied from interface: `GhidraDataConverter`
    Generate a long value by invoking buf.getBytes at the specified offset.
    Specified by:
      `getLong` in interface `GhidraDataConverter`
    Parameters:
      `buf` - MemBuffer source of bytes
      `offset` - offset in mem buffer to read
    Returns:
      long value
    Throws:
      `MemoryAccessException` - if failed to read 8-bytes at the specified offset

  - ### getBigInteger

    public final BigInteger getBigInteger(MemBuffer buf, int offset, int size, boolean signed) throws MemoryAccessException
    Description copied from interface: `GhidraDataConverter`
    Generate a BigInteger value by invoking buf.getBytes at the specified offset.
    Specified by:
      `getBigInteger` in interface `GhidraDataConverter`
    Parameters:
      `buf` - MemBuffer source of bytes
      `offset` - offset in mem buffer to read
      `size` - number of bytes
      `signed` - boolean flag
    Returns:
      BigInteger value
    Throws:
      `MemoryAccessException` - if failed to read specified number of bytes at the specified offset