Package com.saperion.common.streams
Class BlockingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.saperion.common.streams.BlockingInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class BlockingInputStream extends java.io.InputStreamThe Class BlockingInputStream.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.InputStreamisThe stream.
-
Constructor Summary
Constructors Constructor Description BlockingInputStream(java.io.InputStream is)Instantiates a new blocking input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()voidmark(int readLimit)booleanmarkSupported()intread()intread(byte[] bf)Blocking Read.intread(byte[] bf, int s, int l)voidreset()longskip(long n)
-
-
-
Method Detail
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjava.io.InputStream- Throws:
java.io.IOException- See Also:
InputStream.available()
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException- See Also:
InputStream.close()
-
mark
public void mark(int readLimit)
- Overrides:
markin classjava.io.InputStream- See Also:
InputStream.mark(int)
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.InputStream- See Also:
InputStream.markSupported()
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException- See Also:
InputStream.read()
-
read
public int read(byte[] bf) throws java.io.IOExceptionBlocking Read.- Overrides:
readin classjava.io.InputStream- Parameters:
bf- the buffer to fill- Returns:
- the number of read bytes or -1 if the end of the stream is reached.
- Throws:
java.io.IOException- Signals that an I/O exception has occurred.- See Also:
InputStream.read(byte[])
-
read
public int read(byte[] bf, int s, int l) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException- See Also:
InputStream.read(byte[], int, int)
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.InputStream- Throws:
java.io.IOException- See Also:
InputStream.reset()
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.InputStream- Throws:
java.io.IOException- See Also:
InputStream.skip(long)
-
-