Package ghidra.program.model.mem
Class MemBufferInputStream
java.lang.Object
java.io.InputStream
ghidra.program.model.mem.MemBufferInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Adapter between
membuffers and inputstreams.-
Constructor Summary
ConstructorsConstructorDescriptionMemBufferInputStream(MemBuffer membuf) Creates a new instance, starting a offset 0 of the membuffer, limited to the first 2Gb of the membuffer.MemBufferInputStream(MemBuffer membuf, int initialPosition, int length) Creates a new instance ofMemBufferInputStream, starting at the specified offset, limited to the firstlengthbytes. -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
MemBufferInputStream
Creates a new instance, starting a offset 0 of the membuffer, limited to the first 2Gb of the membuffer.- Parameters:
membuf-MemBufferto wrap as an inputstream
-
MemBufferInputStream
Creates a new instance ofMemBufferInputStream, starting at the specified offset, limited to the firstlengthbytes.- Parameters:
membuf-MemBufferto wrap as an inputstreaminitialPosition- starting position in the membufferlength- number of bytes to limit this inputstream to. The sum ofinitialPositionandlengthmust not exceedInteger.MAX_VALUE+1
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-