Package org.apache.commons.io.input
Class CircularInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.commons.io.input.CircularInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
InfiniteCircularInputStream
public class CircularInputStream extends java.io.InputStream
AnInputStream
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
.- Since:
- 2.8.0
- See Also:
InfiniteCircularInputStream
-
-
Constructor Summary
Constructors Constructor Description CircularInputStream(byte[] repeatContent, long targetByteCount)
Creates an instance from the specified array of bytes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read()
-
-
-
Constructor Detail
-
CircularInputStream
public CircularInputStream(byte[] repeatContent, long targetByteCount)
Creates an instance from the specified array of bytes.- Parameters:
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.
-
-