public class CircularBufferInputStream
extends java.io.FilterInputStream
CircularByteBuffer. Unlike the
BufferedInputStream, this one doesn't need to reallocate byte arrays internally.| Constructor and Description |
|---|
CircularBufferInputStream(java.io.InputStream inputStream)
Creates a new instance, which filters the given input stream, and uses a reasonable default buffer size
(
IOUtils.DEFAULT_BUFFER_SIZE). |
CircularBufferInputStream(java.io.InputStream inputStream,
int bufferSize)
Creates a new instance, which filters the given input stream, and uses the given buffer size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
read() |
int |
read(byte[] targetBuffer,
int offset,
int length) |
public CircularBufferInputStream(java.io.InputStream inputStream)
IOUtils.DEFAULT_BUFFER_SIZE).inputStream - The input stream, which is being buffered.public CircularBufferInputStream(java.io.InputStream inputStream,
int bufferSize)
inputStream - The input stream, which is being buffered.bufferSize - The size of the CircularByteBuffer, which is used internally.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] targetBuffer,
int offset,
int length)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionCopyright © 2010 - 2023 Adobe. All Rights Reserved