public final class ByteBufferUtil extends Object
ByteBuffer
s.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
IOException
public static void toFile(ByteBuffer buffer, File file) throws IOException
IOException
public static void toStream(ByteBuffer byteBuffer, OutputStream os) throws IOException
IOException
public static byte[] toBytes(ByteBuffer byteBuffer)
public static InputStream toStream(ByteBuffer buffer)
public static ByteBuffer fromStream(InputStream stream) throws IOException
IOException