Package com.storedobject.common
Class InvertedInputStream
java.lang.Object
java.io.InputStream
com.storedobject.common.InvertedInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Create an
InputStream
such that whatever is read from this stream should be the same as whatever written to
an associated OutputStream
! Beware: The associated OutputStream
should be practically written to
from a different thread.- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Get the associatedOutputStream
.int
read()
int
read
(byte[] b) Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
InvertedInputStream
public InvertedInputStream()Constructor.
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
getOutputStream
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-