Package ghidra.app.util.bin
Class ByteProviderInputStream
java.lang.Object
java.io.InputStream
ghidra.app.util.bin.ByteProviderInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
ByteProviderInputStream.ClosingInputStream
An
InputStream that reads from a ByteProvider.
Does not close the underlying ByteProvider when closed itself.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAnInputStreamthat reads from aByteProvider, and DOESclose()the underlying ByteProvider when closed itself. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionByteProviderInputStream(ByteProvider provider) Creates an InputStream that uses a ByteProvider as its source of bytes.ByteProviderInputStream(ByteProvider provider, long startPosition) Creates an InputStream that uses a ByteProvider as its source of bytes. -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, read, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
provider
-
-
Constructor Details
-
ByteProviderInputStream
Creates an InputStream that uses a ByteProvider as its source of bytes.- Parameters:
provider- theByteProviderto wrap
-
ByteProviderInputStream
Creates an InputStream that uses a ByteProvider as its source of bytes.- Parameters:
provider- theByteProviderto wrapstartPosition- starting position in the provider
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-