public final class InputStreamRewinder extends java.lang.Object implements DataRewinder<java.io.InputStream>
InputStream
s that rewinds streams by wrapping them in a buffered
stream.Modifier and Type | Class and Description |
---|---|
static class |
InputStreamRewinder.Factory
Factory for producing
InputStreamRewinder s from InputStream s. |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Called when this rewinder is no longer needed and can be cleaned up.
|
java.io.InputStream |
rewindAndGet()
Rewinds the wrapped data back to the position it was at when this object was instantiated and
returns the re-wound data (or a wrapper for the re-wound data).
|
@NonNull public java.io.InputStream rewindAndGet() throws java.io.IOException
DataRewinder
rewindAndGet
in interface DataRewinder<java.io.InputStream>
java.io.IOException
public void cleanup()
DataRewinder
The underlying data may still be in use and should not be closed or invalidated.
cleanup
in interface DataRewinder<java.io.InputStream>