Class DefaultEmuUnixFileHandle<T>

java.lang.Object
ghidra.pcode.emu.unix.AbstractEmuUnixFileHandle<T>
ghidra.pcode.emu.unix.DefaultEmuUnixFileHandle<T>
Type Parameters:
T - the type of values stored in the file
All Implemented Interfaces:
EmuUnixFileDescriptor<T>

public class DefaultEmuUnixFileHandle<T> extends AbstractEmuUnixFileHandle<T>
A concrete file descriptor
  • Constructor Details

  • Method Details

    • getOffset MODIFIED

      public long getOffset()
      return type: T → long
      -T getOffset()
      +long getOffset()
      Description copied from interface: EmuUnixFileDescriptor
      Returns the current offset of the file, or 0 if not applicable.
      Returns:
      the current offset of the file, or 0 if not applicable
    • getAbstractOffset NEW

      public T getAbstractOffset()
      Description copied from interface: EmuUnixFileDescriptor
      Returns the current offset of the file, or 0 if not applicable.
      Returns:
      the current offset of the file, or 0 if not applicable
    • seek

      public void seek(T offset) throws EmuIOException
      Description copied from interface: EmuUnixFileDescriptor
      Seek to the given offset
      Parameters:
      offset - the desired offset
      Throws:
      EmuIOException - if an error occurred
    • seek NEW

      public void seek(long offset) throws EmuIOException
      Description copied from interface: EmuUnixFileDescriptor
      Seek to the given offset
      Parameters:
      offset - the desired offset
      Throws:
      EmuIOException - if an error occurred
    • read MODIFIED

      public int read(T buf) throws EmuIOException
      return type: T → int
      -T read(T buf) throws EmuIOException
      +int read(T buf) throws EmuIOException
      Description copied from interface: EmuUnixFileDescriptor
      Read from the file opened by this handle
      Parameters:
      buf - the destination buffer
      Returns:
      the number of bytes read
      Throws:
      EmuIOException - if an error occurred
    • readAbstract NEW

      public T readAbstract(T buf) throws EmuIOException
      Description copied from interface: EmuUnixFileDescriptor
      Read from the file opened by this handle
      Parameters:
      buf - the destination buffer
      Returns:
      the number of bytes read
      Throws:
      EmuIOException - if an error occurred
    • write MODIFIED

      public int write(T buf) throws EmuIOException
      return type: T → int
      -T write(T buf) throws EmuIOException
      +int write(T buf) throws EmuIOException
      Description copied from interface: EmuUnixFileDescriptor
      Write into the file opened by this handle
      Parameters:
      buf - the source buffer
      Returns:
      the number of bytes written
      Throws:
      EmuIOException - if an error occurred
    • writeAbstract NEW

      public T writeAbstract(T buf) throws EmuIOException
      Description copied from interface: EmuUnixFileDescriptor
      Write into the file opened by this handle
      Parameters:
      buf - the source buffer
      Returns:
      the number of bytes written
      Throws:
      EmuIOException - if an error occurred