com.bumptech.glide.util
Class ContentLengthInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.bumptech.glide.util.ContentLengthInputStream
- All Implemented Interfaces:
- Closeable
public final class ContentLengthInputStream
- extends FilterInputStream
Uses the content length as the basis for the return value of available() and verifies
that at least content length bytes are returned from the various read methods.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
obtain
public static InputStream obtain(InputStream other,
String contentLengthHeader)
obtain
public static InputStream obtain(InputStream other,
long contentLength)
available
public int available()
throws IOException
- Overrides:
available in class FilterInputStream
- Throws:
IOException
read
public int read()
throws IOException
- Overrides:
read in class FilterInputStream
- Throws:
IOException
read
public int read(byte[] buffer)
throws IOException
- Overrides:
read in class FilterInputStream
- Throws:
IOException
read
public int read(byte[] buffer,
int byteOffset,
int byteCount)
throws IOException
- Overrides:
read in class FilterInputStream
- Throws:
IOException