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
FieldsFields inherited from interface ghidra.pcode.emu.unix.EmuUnixFileDescriptor
FD_STDERR, FD_STDIN, FD_STDOUT -
Constructor Summary
ConstructorsConstructorDescriptionAbstractStreamEmuUnixFileHandle(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, waitMethods 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:EmuUnixFileDescriptorGet the current offset of the file, or 0 if not applicable- Specified by:
getOffsetin interfaceEmuUnixFileDescriptor<T>- Returns:
- the offset
-
seek
Description copied from interface:EmuUnixFileDescriptorSee to the given offset- Specified by:
seekin interfaceEmuUnixFileDescriptor<T>- Parameters:
offset- the desired offset- Throws:
EmuIOException- if an error occurred
-
stat
Description copied from interface:EmuUnixFileDescriptorObtain thestatstructure of the file opened by this handle- Specified by:
statin interfaceEmuUnixFileDescriptor<T>
-