public class ReadAheadBufferedStream extends FilterInputStream
in| Constructor and Description |
|---|
ReadAheadBufferedStream(InputStream in)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] externalBuf,
int off,
int len)
Returing byte array, from cache of reading socket if needed.
|
void |
reset() |
long |
skip(long n) |
mark, readpublic ReadAheadBufferedStream(InputStream in)
Implementation doesn't use synchronized/semaphore because all used are already locked by Statement/PreparedStatement Reentrant lock
in - socket input streampublic int read(byte[] externalBuf,
int off,
int len)
throws IOException
read in class FilterInputStreamexternalBuf - buf to filloff - offsetlen - length to readIOException - if exception during socket readingpublic boolean markSupported()
markSupported in class FilterInputStreampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic int available()
throws IOException
available in class FilterInputStreamIOExceptionpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionpublic void reset()
throws IOException
reset in class FilterInputStreamIOExceptionCopyright © 2025 SingleStore. All rights reserved.