public class ChunkedInputStream
extends java.io.FilterInputStream
| Modifier and Type | Field and Description |
|---|---|
static java.nio.ByteBuffer |
EMPTY_BYTE_BUFFER |
| Constructor and Description |
|---|
ChunkedInputStream(java.io.InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
markSupported() |
int |
read()
Reads the next byte of data from the input stream.
|
int |
read(byte[] b,
int off,
int len)
An optimized way to read to byte array, rather read byte one by one
|
public int read()
throws java.io.IOException
int in the range 0 to
255. If no byte is available because the end of the stream
has been reached, the value -1 is returned. This method
blocks until input data is available, the end of the stream is detected,
or an exception is thrown.
A subclass must provide an implementation of this method.
read in class java.io.FilterInputStream-1 if the end of the
stream is reached.java.io.IOException - if an I/O error occurs.public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamb - the buffer into which the data is read.off - the start offset in array b
at which the data is written.len - the maximum number of bytes to read.java.io.IOException - I/O errorpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterInputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.FilterInputStreamCopyright © 2024. All rights reserved.