public final class ContentLengthInputStream extends FilterInputStream
available() and verifies
that at least content length bytes are returned from the various read methods.in| Modifier and Type | Method and Description |
|---|---|
int |
available() |
static InputStream |
obtain(InputStream other,
long contentLength) |
static InputStream |
obtain(InputStream other,
String contentLengthHeader) |
int |
read() |
int |
read(byte[] buffer) |
int |
read(byte[] buffer,
int byteOffset,
int byteCount) |
close, mark, markSupported, reset, skippublic static InputStream obtain(InputStream other, String contentLengthHeader)
public static InputStream obtain(InputStream other, long contentLength)
public int available()
throws IOException
available in class FilterInputStreamIOExceptionpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] buffer)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] buffer,
int byteOffset,
int byteCount)
throws IOException
read in class FilterInputStreamIOException