Package org.apache.commons.io.input
Class InfiniteCircularInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.commons.io.input.InfiniteCircularInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class InfiniteCircularInputStream extends java.io.InputStream
AnInputStream
that infinitely repeats provided bytes.Closing a
InfiniteCircularInputStream
has no effect. The methods in this class can be called after the stream has been closed without generating anIOException
.- Since:
- 2.6
-
-
Field Summary
Fields Modifier and Type Field Description private int
position
private byte[]
repeatedContent
-
Constructor Summary
Constructors Constructor Description InfiniteCircularInputStream(byte[] repeatedContent)
Creates a InfiniteCircularStream from the specified array of chars.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read()
-