public final class InputStreamRewinder extends Object implements DataRewinder<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.
|
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).
|
public InputStream rewindAndGet() throws IOException
DataRewinder
rewindAndGet
in interface DataRewinder<InputStream>
IOException
public void cleanup()
DataRewinder
The underlying data may still be in use and should not be closed or invalidated.
cleanup
in interface DataRewinder<InputStream>