public final class InputStreamRewinder extends java.lang.Object implements DataRewinder<java.io.InputStream>
InputStreams that rewinds streams by wrapping them in a buffered
stream.| Modifier and Type | Class and Description |
|---|---|
static class |
InputStreamRewinder.Factory
Factory for producing
InputStreamRewinders from InputStreams. |
| 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
DataRewinderrewindAndGet in interface DataRewinder<java.io.InputStream>java.io.IOExceptionpublic void cleanup()
DataRewinderThe underlying data may still be in use and should not be closed or invalidated.
cleanup in interface DataRewinder<java.io.InputStream>