com.bumptech.glide.util
Class MarkEnforcingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.bumptech.glide.util.MarkEnforcingInputStream
- All Implemented Interfaces:
- Closeable
public class MarkEnforcingInputStream
- extends FilterInputStream
Prevents InputStreams
from overflowing their buffer by reading data past their read limit.
Method Summary |
int |
available()
|
void |
mark(int readlimit)
|
int |
read()
|
int |
read(byte[] buffer,
int byteOffset,
int byteCount)
|
void |
reset()
|
long |
skip(long byteCount)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MarkEnforcingInputStream
public MarkEnforcingInputStream(InputStream in)
mark
public void mark(int readlimit)
- Overrides:
mark
in class FilterInputStream
read
public int read()
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
reset
public void reset()
throws IOException
- Overrides:
reset
in class FilterInputStream
- Throws:
IOException
skip
public long skip(long byteCount)
throws IOException
- Overrides:
skip
in class FilterInputStream
- Throws:
IOException
available
public int available()
throws IOException
- Overrides:
available
in class FilterInputStream
- Throws:
IOException