Package de.aristaflow.adept2.util.io
Class RereadableContent.RrcInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- de.aristaflow.adept2.util.io.AttributedInputStream
-
- de.aristaflow.adept2.util.io.RereadableContent.RrcInputStream
-
- All Implemented Interfaces:
Attributable
,Closeable
,AutoCloseable
- Enclosing class:
- RereadableContent
protected static class RereadableContent.RrcInputStream extends AttributedInputStream
This class is an input stream that also provides theRereadableContent
it has been created for. This allows to easily reuse theRereadableContent
without copying its data.
-
-
Field Summary
-
Fields inherited from class de.aristaflow.adept2.util.io.AttributedInputStream
cleanup
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description RrcInputStream(InputStream is, RereadableContent rrc, CleanupTask<IOException> cleanup)
Creates a new input stream with the designated input stream as content and wrapping the designatedRereadableContent
.
-
Method Summary
-
Methods inherited from class de.aristaflow.adept2.util.io.AttributedInputStream
close, computeIfAbsent, contains, containsType, get, putIfAbsent, remove, replace, replace, unwrap
-
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, read, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
RrcInputStream
public RrcInputStream(InputStream is, RereadableContent rrc, CleanupTask<IOException> cleanup)
Creates a new input stream with the designated input stream as content and wrapping the designatedRereadableContent
.- Parameters:
is
- The content of theRereadableContent
rrc
- The wrappedRereadableContent
that created this input stream.cleanup
- An additional clean-up task for the created instance.
-
-