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) |
public static ByteBuffer fromFile(File file) throws IOException
IOExceptionpublic static void toFile(ByteBuffer buffer, File file) throws IOException
IOExceptionpublic static void toStream(ByteBuffer byteBuffer, OutputStream os) throws IOException
IOExceptionpublic static byte[] toBytes(ByteBuffer byteBuffer)
public static InputStream toStream(ByteBuffer buffer)
public static ByteBuffer fromStream(InputStream stream) throws IOException
IOException