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 TypeMethodDescriptionvoidclose()Get the associatedOutputStream.intread()intread(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:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
getOutputStream
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-