Package com.bumptech.glide.util
Class ByteBufferUtil
java.lang.Object
com.bumptech.glide.util.ByteBufferUtil
Utilities for interacting with
ByteBuffers.-
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBufferstatic ByteBufferfromStream(InputStream stream) static ByteBufferrewind(ByteBuffer buffer) static byte[]toBytes(ByteBuffer byteBuffer) static voidtoFile(ByteBuffer buffer, File file) static InputStreamtoStream(ByteBuffer buffer) static voidtoStream(ByteBuffer byteBuffer, OutputStream os)
-
Method Details
-
fromFile
- Throws:
IOException
-
toFile
- Throws:
IOException
-
toStream
public static void toStream(@NonNull ByteBuffer byteBuffer, @NonNull OutputStream os) throws IOException - Throws:
IOException
-
toBytes
-
toStream
-
fromStream
- Throws:
IOException
-
rewind
-