public class BufferUtil extends Object
Constructor and Description |
---|
BufferUtil() |
Modifier and Type | Method and Description |
---|---|
static ByteBuffer |
createByteBuffer(int capacity) |
static byte[] |
getBytesFromInputStream(InputStream is) |
static InputStream |
newInputStream(ByteBuffer buf)
Returns an input stream for a ByteBuffer.
|
static ByteBuffer |
readInputStream(InputStream in)
Fully reads the given InputStream, returning its contents as a ByteBuffer
|
public static ByteBuffer readInputStream(InputStream in) throws IOException
in
- an InputStream
valueByteBuffer
valueIOException
- if an error occurspublic static ByteBuffer createByteBuffer(int capacity)
public static InputStream newInputStream(ByteBuffer buf)
public static byte[] getBytesFromInputStream(InputStream is) throws IOException
IOException
Copyright © 2007-2019. All Rights Reserved.