Package org.apache.axiom.testutils.io
Class CloseSensorInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.commons.io.input.ProxyInputStream
-
- org.apache.axiom.testutils.io.CloseSensorInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CloseSensorInputStream extends org.apache.commons.io.input.ProxyInputStreamInputStreamwrapper that remembers ifInputStream.close()has been called.
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description CloseSensorInputStream(InputStream parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanisClosed()-
Methods inherited from class org.apache.commons.io.input.ProxyInputStream
afterRead, available, beforeRead, handleIOException, mark, markSupported, read, read, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
CloseSensorInputStream
public CloseSensorInputStream(InputStream parent)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-
isClosed
public boolean isClosed()
-
-