Package ghidra.pcode.emu.unix
Class AbstractStreamEmuUnixFileHandle<T>
java.lang.Object
ghidra.pcode.emu.unix.AbstractStreamEmuUnixFileHandle<T>
- Type Parameters:
T
- the type of values in the file
- All Implemented Interfaces:
EmuUnixFileDescriptor<T>
- Direct Known Subclasses:
IOStreamEmuUnixFileHandle
public abstract class AbstractStreamEmuUnixFileHandle<T>
extends Object
implements EmuUnixFileDescriptor<T>
An abstract file descriptor having no "offset," typically for stream-like files
-
Field Summary
Fields inherited from interface ghidra.pcode.emu.unix.EmuUnixFileDescriptor
FD_STDERR, FD_STDIN, FD_STDOUT
-
Constructor Summary
ConstructorDescriptionAbstractStreamEmuUnixFileHandle
(PcodeMachine<T> machine, CompilerSpec cSpec) Construct a new handle -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.pcode.emu.unix.EmuUnixFileDescriptor
close, read, write
-
Field Details
-
arithmetic
-
offsetBytes
protected final int offsetBytes
-
-
Constructor Details
-
AbstractStreamEmuUnixFileHandle
Construct a new handle- Parameters:
machine
- the machine emulating the hardwarecSpec
- the ABI of the target platform- See Also:
-
-
Method Details
-
getOffset
Description copied from interface:EmuUnixFileDescriptor
Get the current offset of the file, or 0 if not applicable- Specified by:
getOffset
in interfaceEmuUnixFileDescriptor<T>
- Returns:
- the offset
-
seek
Description copied from interface:EmuUnixFileDescriptor
See to the given offset- Specified by:
seek
in interfaceEmuUnixFileDescriptor<T>
- Parameters:
offset
- the desired offset- Throws:
EmuIOException
- if an error occurred
-
stat
Description copied from interface:EmuUnixFileDescriptor
Obtain thestat
structure of the file opened by this handle- Specified by:
stat
in interfaceEmuUnixFileDescriptor<T>
-