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, skip
public static InputStream obtain(InputStream other, String contentLengthHeader)
public static InputStream obtain(InputStream other, long contentLength)
public int available() throws IOException
available
in class FilterInputStream
IOException
public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(@NonNull byte[] buffer) throws IOException
read
in class FilterInputStream
IOException
public int read(@NonNull byte[] buffer, int byteOffset, int byteCount) throws IOException
read
in class FilterInputStream
IOException