Class ByteBufferRewinder
- java.lang.Object
-
- com.bumptech.glide.load.resource.bytes.ByteBufferRewinder
-
- All Implemented Interfaces:
DataRewinder<java.nio.ByteBuffer>
public class ByteBufferRewinder extends java.lang.Object implements DataRewinder<java.nio.ByteBuffer>
RewindsByteBuffers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classByteBufferRewinder.FactoryFactory forByteBufferRewinder.
-
Constructor Summary
Constructors Constructor Description ByteBufferRewinder(java.nio.ByteBuffer buffer)
-
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.java.nio.ByteBufferrewindAndGet()Rewinds the wrapped data back to the beginning and returns the re-wound data (or a wrapper for the re-wound data).
-
-
-
Method Detail
-
rewindAndGet
@NonNull public java.nio.ByteBuffer rewindAndGet()
Description 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.nio.ByteBuffer>- Returns:
- An object pointing to the wrapped data.
-
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.nio.ByteBuffer>
-
-