public class BufferingReader extends Reader
freeData(int)| Constructor and Description |
|---|
BufferingReader(Reader reader) |
BufferingReader(Reader reader,
int bufferBlockSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
freeData(int count)
Get some data that have been buffered, and free corresponding space in the buffer.
|
int |
getBufferSize()
Get the size of the buffer.
|
int |
getDataLength()
Get the length of data available in the buffer.
|
int |
read(char[] cbuf,
int off,
int len) |
boolean |
ready() |
void |
shrinkBuffer()
Shrink the buffer to its minimal size to store actual data.
|
public BufferingReader(Reader reader, int bufferBlockSize)
public BufferingReader(Reader reader)
public boolean ready() throws IOException
ready in class ReaderIOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOExceptionpublic int read(char[] cbuf, int off, int len) throws IOException
read in class ReaderIOExceptionpublic int getDataLength()
public String freeData(int count)
count - the number of characters to getIndexOutOfBoundsException - if the amount of data asked is more than what is available in the buffergetDataLength()public int getBufferSize()
public void shrinkBuffer()
Copyright © 2004–2014. All rights reserved.