public final class ByteBufferUtil extends Object
ByteBuffers.| Modifier and Type | Method and Description |
|---|---|
static ByteBuffer |
fromFile(File file) |
static ByteBuffer |
fromStream(InputStream stream) |
static byte[] |
toBytes(ByteBuffer byteBuffer) |
static void |
toFile(ByteBuffer buffer,
File file) |
static InputStream |
toStream(ByteBuffer buffer) |
static void |
toStream(ByteBuffer byteBuffer,
OutputStream os) |
@NonNull public static ByteBuffer fromFile(@NonNull File file) throws IOException
IOExceptionpublic static void toFile(@NonNull ByteBuffer buffer, @NonNull File file) throws IOException
IOExceptionpublic static void toStream(@NonNull ByteBuffer byteBuffer, @NonNull OutputStream os) throws IOException
IOException@NonNull public static byte[] toBytes(@NonNull ByteBuffer byteBuffer)
@NonNull public static InputStream toStream(@NonNull ByteBuffer buffer)
@NonNull public static ByteBuffer fromStream(@NonNull InputStream stream) throws IOException
IOException