Package org.greenrobot.essentials.io
Class RepeaterInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.greenrobot.essentials.io.RepeaterInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class RepeaterInputStream extends java.io.FilterInputStreamRepeats an input stream to an additional OutputStream. The data of the InputStream becomes available for two purposes, e.g. reading data and storing for caching. Note: OutputStream is not closed when close() is called.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.OutputStreamout
-
Constructor Summary
Constructors Constructor Description RepeaterInputStream(java.io.InputStream in, java.io.OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b)intread(byte[] b, int off, int len)voidreset()
-
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.FilterInputStream
-
mark
public void mark(int readlimit)
- Overrides:
markin classjava.io.FilterInputStream
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
-