Package ghidra.app.util.bin
Class ByteProviderInputStream.ClosingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- ghidra.app.util.bin.ByteProviderInputStream
-
- ghidra.app.util.bin.ByteProviderInputStream.ClosingInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- ByteProviderInputStream
public static class ByteProviderInputStream.ClosingInputStream extends ByteProviderInputStream
AnInputStream
that reads from aByteProvider
, and DOESclose()
the underlying ByteProvider when closed itself.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ghidra.app.util.bin.ByteProviderInputStream
ByteProviderInputStream.ClosingInputStream
-
-
Field Summary
-
Fields inherited from class ghidra.app.util.bin.ByteProviderInputStream
provider
-
-
Constructor Summary
Constructors Constructor Description ClosingInputStream(ByteProvider provider)
Creates anInputStream
that reads from aByteProvider
, that DOESclose()
the underlying ByteProvider when closed itself.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
-
Methods inherited from class ghidra.app.util.bin.ByteProviderInputStream
available, mark, markSupported, read, read, reset, skip
-
-
-
-
Constructor Detail
-
ClosingInputStream
public ClosingInputStream(ByteProvider provider)
Creates anInputStream
that reads from aByteProvider
, that DOESclose()
the underlying ByteProvider when closed itself.- Parameters:
provider
- theByteProvider
to read from (and close)
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classByteProviderInputStream
- Throws:
java.io.IOException
-
-