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
Modifier and TypeClassDescriptionstatic class
AnInputStream
that reads from aByteProvider
, and DOESclose()
the underlying ByteProvider when closed itself. -
Field Summary
-
Constructor Summary
ConstructorDescriptionByteProviderInputStream
(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
- theByteProvider
to wrap
-
ByteProviderInputStream
Creates an InputStream that uses a ByteProvider as its source of bytes.- Parameters:
provider
- theByteProvider
to wrapstartPosition
- starting position in the provider
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
mark
public void mark(int readlimit) - Overrides:
mark
in classInputStream
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-