Package de.aristaflow.adept2.util.io
Class MemoryContent
java.lang.Object
de.aristaflow.adept2.util.io.RereadableContent
de.aristaflow.adept2.util.io.MemoryContent
- All Implemented Interfaces:
Closeable,AutoCloseable
A
RereadableContent based on memory data.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classThis class implements the cleanup (nulling the byte array) without referring to theRereadableContentit cleans up.Nested classes/interfaces inherited from class de.aristaflow.adept2.util.io.RereadableContent
RereadableContent.RrcCleanup, RereadableContent.RrcInputStream -
Field Summary
Fields inherited from class de.aristaflow.adept2.util.io.RereadableContent
cleanup, existingStreams, finalCleanup, RRC_CONTENT_FILE, RRC_INPUT_STREAM_SIZE, sha512hash, size -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newRereadableContentbased on the designated output stream. -
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
-
Constructor Details
-
MemoryContent
Creates a newRereadableContentbased on the designated output stream.- Parameters:
sos- TheSwitchingOutputStreamproviding the data, its size and its SHA-512 hash.- Throws:
IOException- If the designated output stream has not been closed yet, 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.
-