Package de.aristaflow.adept2.util.io
Class CloseInCleanupInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- de.aristaflow.adept2.util.io.CloseInCleanupInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class CloseInCleanupInputStream extends FilterInputStream
-
-
Field Summary
Fields Modifier and Type Field Description protected Cleanup<IOException>
cleanup
The clean-up for closing the wrapped input stream as post-mortem action of thisCloseInCleanupInputStream
.-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description CloseInCleanupInputStream(InputStream in)
Creates a new stream that ensures post-mortem clean-up of the designated stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
-
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, transferTo
-
-
-
-
Field Detail
-
cleanup
protected final Cleanup<IOException> cleanup
The clean-up for closing the wrapped input stream as post-mortem action of thisCloseInCleanupInputStream
.
-
-
Constructor Detail
-
CloseInCleanupInputStream
public CloseInCleanupInputStream(InputStream in)
Creates a new stream that ensures post-mortem clean-up of the designated stream.- Parameters:
in
- The wrapped stream.
-
-
Method Detail
-
close
public final void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- Throws:
IOException
-
-