Package ghidra.util
Class BoundedInputStream
java.lang.Object
java.io.InputStream
ghidra.util.BoundedInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
InputStream
wrapper that limits itself to a portion of the wrapped stream.-
Constructor Summary
ConstructorDescriptionBoundedInputStream
(InputStream wrappedInputStream, long size) Creates a new instance. -
Method Summary
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Constructor Details
-
BoundedInputStream
Creates a new instance.- Parameters:
wrappedInputStream
-InputStream
to wrap, already positioned to the desired starting position.size
- number of bytes to allow this wrapper to read.
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-