Class ScanResultInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.github.rvesse.airline.parser.resources.jpms.ScanResultInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
A wrapper around an InputStream originating from a
ScanResult
to ensure that it is closed when the stream is
closed-
Field Summary
FieldsFields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorsConstructorDescriptionScanResultInputStream
(io.github.classgraph.ScanResult result, InputStream in) Creates a wrapper around anInputStream
that was creating from a Class GraphScanResult
. -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, read, read, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
result
private final io.github.classgraph.ScanResult result
-
-
Constructor Details
-
ScanResultInputStream
ScanResultInputStream(io.github.classgraph.ScanResult result, InputStream in) Creates a wrapper around anInputStream
that was creating from a Class GraphScanResult
. This ensures that when the stream is closed we also close theScanResult
from which it originated thus avoiding any resource leaks perScanResult.close()
.- Parameters:
result
- Scan Result that originated the input streamin
- Input Stream
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- Throws:
IOException
-