-
- All Implemented Interfaces:
-
com.mobwith.imgmodule.load.data.DataRewinder
public final class InputStreamRewinder implements DataRewinder<InputStream>
Implementation for InputStreams that rewinds streams by wrapping them in a buffered stream.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classInputStreamRewinder.FactoryFactory for producing com.mobwith.imgmodule.load.data.InputStreamRewinders from s.
-
Constructor Summary
Constructors Constructor Description InputStreamRewinder(InputStream is, ArrayPool byteArrayPool)
-
Method Summary
Modifier and Type Method Description InputStreamrewindAndGet()Rewinds the wrapped data back to the beginning and returns the re-wound data (or a wrapper forthe re-wound data). voidcleanup()Called when this rewinder is no longer needed and can be cleaned up. voidfixMarkLimits()-
-
Constructor Detail
-
InputStreamRewinder
InputStreamRewinder(InputStream is, ArrayPool byteArrayPool)
-
-
Method Detail
-
rewindAndGet
@NonNull() InputStream rewindAndGet()
Rewinds the wrapped data back to the beginning and returns the re-wound data (or a wrapper forthe re-wound data).
-
cleanup
void cleanup()
Called when this rewinder is no longer needed and can be cleaned up.
The underlying data may still be in use and should not be closed or invalidated.
-
fixMarkLimits
void fixMarkLimits()
-
-
-
-