Package org.apache.commons.io.input
Class CircularInputStream
java.lang.Object
java.io.InputStream
org.apache.commons.io.input.AbstractInputStream
org.apache.commons.io.input.CircularInputStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable
- Direct Known Subclasses:
- InfiniteCircularInputStream
An 
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.
 
- Since:
- 2.8.0
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCircularInputStream(byte[] repeatContent, long targetByteCount) Constructs an instance from the specified array of bytes.
- 
Method SummaryMethods inherited from class org.apache.commons.io.input.AbstractInputStreamisClosed, setClosedMethods inherited from class java.io.InputStreammark, markSupported, read, read, reset, skip
- 
Constructor Details- 
CircularInputStreamConstructs 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.
 
 
- 
- 
Method Details- 
available- Overrides:
- availablein class- InputStream
- Throws:
- IOException
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- AbstractInputStream
- Throws:
- IOException
 
- 
read- Specified by:
- readin class- InputStream
 
 
-