public class BufferUtil
extends java.lang.Object
| Constructor and Description |
|---|
BufferUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.nio.ByteBuffer |
createByteBuffer(int capacity) |
static byte[] |
getBytesFromInputStream(java.io.InputStream is) |
static java.io.InputStream |
newInputStream(java.nio.ByteBuffer buf)
Returns an input stream for a ByteBuffer.
|
static java.nio.ByteBuffer |
readInputStream(java.io.InputStream in)
Fully reads the given InputStream, returning its contents as a ByteBuffer
|
public static java.nio.ByteBuffer readInputStream(java.io.InputStream in)
throws java.io.IOException
in - an InputStream valueByteBuffer valuejava.io.IOException - if an error occurspublic static java.nio.ByteBuffer createByteBuffer(int capacity)
public static java.io.InputStream newInputStream(java.nio.ByteBuffer buf)
public static byte[] getBytesFromInputStream(java.io.InputStream is)
throws java.io.IOException
java.io.IOExceptionCopyright © 2007–2023. All rights reserved.