public class NonBlockingBufferedInputStream
extends java.io.InputStream
| Constructor and Description |
|---|
NonBlockingBufferedInputStream() |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
return the number of bytes available to be read without blocking
|
void |
close()
disassociate from the underlying input stream
|
int |
peek()
Just like read except byte is not removed from the buffer.
|
int |
read()
Read a byte from the input stream, blocking if necessary.
|
int |
read(byte[] dest)
Read bytes from the input stream.
|
int |
read(byte[] dest,
int off,
int len)
Read a specified number of bytes from the input stream.
|
void |
setContentLength(int value)
set the maximum number of bytes allowed to be read from this input
stream.
|
void |
setInputStream(java.io.InputStream in)
set the input stream to be used for subsequent reads
|
int |
skip(int len)
skip over (and discard) a specified number of bytes in this input
stream
|
public void setInputStream(java.io.InputStream in)
in - the InputStreampublic void setContentLength(int value)
value - the Content Lengthpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] dest)
throws java.io.IOException
read in class java.io.InputStreamdest - byte array to read intojava.io.IOExceptionpublic int read(byte[] dest,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamdest - byte array to read intooff - starting offset into the byte arraylen - maximum number of bytes to readjava.io.IOExceptionpublic int skip(int len)
throws java.io.IOException
len - the number of bytes to be skippedjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic int peek()
throws java.io.IOException
java.io.IOExceptionCopyright ? 2005 Apache Web Services Project. All Rights Reserved.