public class SelfExpandingBufferredInputStream
extends java.io.BufferedInputStream
BufferedInputStream enforcing the contract where reset()
always returns to the beginning of the stream, and the internal buffer
expands automatically to the total length of content read from the underlying
stream.| Modifier and Type | Field and Description |
|---|---|
private static int |
defaultBufferSize |
| Constructor and Description |
|---|
SelfExpandingBufferredInputStream(java.io.InputStream in) |
SelfExpandingBufferredInputStream(java.io.InputStream in,
int size) |
| Modifier and Type | Method and Description |
|---|---|
private void |
expand()
Double the current buffer size limit.
|
int |
getBufSize()
Return the current maximum size of the internal buffer.
|
int |
getCount() |
int |
getMarkLimit() |
int |
getMarkPos() |
int |
getPos() |
void |
mark(int readlimit)
Not supported.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
public SelfExpandingBufferredInputStream(java.io.InputStream in)
public SelfExpandingBufferredInputStream(java.io.InputStream in,
int size)
public void mark(int readlimit)
mark in class java.io.BufferedInputStreampublic int read()
throws java.io.IOException
read in class java.io.BufferedInputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.BufferedInputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionprivate void expand()
throws java.io.IOException
java.io.IOExceptionpublic int getBufSize()
public int getCount()
public int getPos()
public int getMarkLimit()
public int getMarkPos()