sdljava.util
public class BufferUtil extends Object
Version: $Id: BufferUtil.java,v 1.5 2005/02/19 02:00:36 ivan_ganza Exp $
Field Summary | |
---|---|
static int | BUFFER_SIZE |
Method Summary | |
---|---|
static ByteBuffer | createByteBuffer(int capacity) |
static ByteBuffer | createByteBuffer(byte[] values) |
static CharBuffer | createCharBuffer(int capacity) |
static CharBuffer | createCharBuffer(char[] values) |
static DoubleBuffer | createDoubleBuffer(int capacity) |
static DoubleBuffer | createDoubleBuffer(double[] values) |
static FloatBuffer | createFloatBuffer(int capacity) |
static FloatBuffer | createFloatBuffer(float[] values) |
static IntBuffer | createIntBuffer(int capacity) |
static IntBuffer | createIntBuffer(int[] values) |
static LongBuffer | createLongBuffer(int capacity) |
static LongBuffer | createLongBuffer(long[] values) |
static ShortBuffer | createShortBuffer(int capacity) |
static ShortBuffer | createShortBuffer(short[] values) |
static ByteBuffer | readInputStream(InputStream in)
Fully reads the given InputStream, returning its contents as a ByteBuffer
|
static ByteBuffer | readURL(URL url)
Tries to open the given URL, get its input stream, returns the data in a direct ByteBuffer
|
Parameters: in an InputStream
value
Returns: a ByteBuffer
value
Throws: IOException if an error occurs
Parameters: url an URL
value
Returns: a ByteBuffer
value with the contacts of the data present at URL
Throws: IOException if an error occurs MalformedURLException if an error occurs