public class CircularInputStream extends AbstractInputStream
InputStream that repeats provided bytes for given target byte count.
Closing this input stream has no effect. The methods in this class can be called after the stream has been closed
without generating an IOException.
InfiniteCircularInputStream| Constructor and Description |
|---|
CircularInputStream(byte[] repeatContent,
long targetByteCount)
Constructs an instance from the specified array of bytes.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
int |
read() |
isClosed, setClosedpublic CircularInputStream(byte[] repeatContent,
long targetByteCount)
repeatContent - Input buffer to be repeated this buffer is not copied.targetByteCount - How many bytes the read. A negative number means an infinite target count.public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class AbstractInputStreamjava.io.IOExceptionpublic int read()
read in class java.io.InputStreamCopyright © 2010 - 2025 Adobe. All Rights Reserved