Package de.aristaflow.adept2.util.io
Class WrappingContent
java.lang.Object
de.aristaflow.adept2.util.io.RereadableContent
de.aristaflow.adept2.util.io.WrappingContent
- All Implemented Interfaces:
Closeable,AutoCloseable
A
RereadableContent based on another RereadableContent. It has its own
RrcInputStream to prevent the wrapped RereableContent from cleaning-up.-
Nested Class Summary
Nested classes/interfaces inherited from class de.aristaflow.adept2.util.io.RereadableContent
RereadableContent.RrcCleanup, RereadableContent.RrcInputStream -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final RereadableContentThe wrappedRereadableContent.Fields inherited from class de.aristaflow.adept2.util.io.RereadableContent
cleanup, existingStreams, finalCleanup, RRC_CONTENT_FILE, RRC_INPUT_STREAM_SIZE, sha512hash, size -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newWrappingContentfor the designated input stream withRereadableContent. -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStreamCreates a new input stream for the content.Methods inherited from class de.aristaflow.adept2.util.io.RereadableContent
close, equals, getInputStream, getSHA512Hash, getSize, getSize, hashCode
-
Field Details
-
rrc
The wrappedRereadableContent.
-
-
Constructor Details
-
WrappingContent
Creates a newWrappingContentfor the designated input stream withRereadableContent.- Parameters:
rrcIs- The input stream created by the wrappedRereadableContent. The caller is responsible for closing.- Throws:
IOException- If creating a new input stream from the wrappedRereadableContentfails, anIOExceptionwill be thrown.
-
-
Method Details
-
createInputStream
Description copied from class:RereadableContentCreates a new input stream for the content.- Specified by:
createInputStreamin classRereadableContent- Returns:
- A new input stream for the content. The caller is responsible for closing.
- Throws:
IOException- If there are problems creating a new input stream for the content, anIOExceptionwill be thrown.
-