public class MarkEnforcingInputStream extends FilterInputStream
InputStreams
from overflowing their buffer by reading data past
their read limit.in
Constructor and Description |
---|
MarkEnforcingInputStream(InputStream in) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
mark(int readLimit) |
int |
read() |
int |
read(byte[] buffer,
int byteOffset,
int byteCount) |
void |
reset() |
long |
skip(long byteCount) |
close, markSupported, read
public MarkEnforcingInputStream(InputStream in)
public void mark(int readLimit)
mark
in class FilterInputStream
public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(@NonNull byte[] buffer, int byteOffset, int byteCount) throws IOException
read
in class FilterInputStream
IOException
public void reset() throws IOException
reset
in class FilterInputStream
IOException
public long skip(long byteCount) throws IOException
skip
in class FilterInputStream
IOException
public int available() throws IOException
available
in class FilterInputStream
IOException