Package com.bumptech.glide.load.data
Class InputStreamRewinder
- java.lang.Object
-
- com.bumptech.glide.load.data.InputStreamRewinder
-
- All Implemented Interfaces:
DataRewinder<java.io.InputStream>
public final class InputStreamRewinder extends java.lang.Object implements DataRewinder<java.io.InputStream>
Implementation forInputStreams that rewinds streams by wrapping them in a buffered stream.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInputStreamRewinder.FactoryFactory for producingInputStreamRewinders fromInputStreams.
-
Constructor Summary
Constructors Constructor Description InputStreamRewinder(java.io.InputStream is, ArrayPool byteArrayPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()Called when this rewinder is no longer needed and can be cleaned up.voidfixMarkLimits()java.io.InputStreamrewindAndGet()Rewinds the wrapped data back to the beginning and returns the re-wound data (or a wrapper for the re-wound data).
-
-
-
Constructor Detail
-
InputStreamRewinder
public InputStreamRewinder(java.io.InputStream is, ArrayPool byteArrayPool)
-
-
Method Detail
-
rewindAndGet
@NonNull public java.io.InputStream rewindAndGet() throws java.io.IOExceptionDescription copied from interface:DataRewinderRewinds the wrapped data back to the beginning and returns the re-wound data (or a wrapper for the re-wound data).- Specified by:
rewindAndGetin interfaceDataRewinder<java.io.InputStream>- Returns:
- An object pointing to the wrapped data.
- Throws:
java.io.IOException
-
cleanup
public void cleanup()
Description copied from interface:DataRewinderCalled 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.
- Specified by:
cleanupin interfaceDataRewinder<java.io.InputStream>
-
fixMarkLimits
public void fixMarkLimits()
-
-