public class Buffer
extends java.lang.Object
Constructor and Description |
---|
Buffer() |
Modifier and Type | Method and Description |
---|---|
static boolean |
CanRead(BufferProxy buf)
Check whether or not the buffer can be read from (i.e., is non-empty).
|
static boolean |
CanWrite(BufferProxy buf)
Check whether or not the buffer can be written to (i.e., is not full).
|
static long |
Capacity(BufferProxy buf)
Check the total capacity of a buffer object.
|
static BufferProxy |
Create(long length)
Create a new j_buffer object with the specified number of bytes.
|
static void |
Free(BufferProxy buf)
Destroy a buffer object, freeing its resources.
|
static int |
Get(BufferProxy buf)
Get a single character from the buffer.
|
static int |
Put(BufferProxy buf,
byte input)
Put a single character into the buffer.
|
static byte[] |
Read(BufferProxy buf,
long length)
Read the specified number of bytes from the buffer.
|
static long |
ReadCapacity(BufferProxy buf)
Check the remaining number of bytes that can be read from the
buffer.
|
static long |
Write(BufferProxy buf,
byte[] input)
Write the specified bytes to the buffer.
|
static long |
WriteCapacity(BufferProxy buf)
Check the remaining number of bytes that can be written to the
buffer.
|
public static BufferProxy Create(long length)
public static long Capacity(BufferProxy buf)
public static boolean CanRead(BufferProxy buf)
public static long ReadCapacity(BufferProxy buf)
public static boolean CanWrite(BufferProxy buf)
public static long WriteCapacity(BufferProxy buf)
public static byte[] Read(BufferProxy buf, long length)
public static long Write(BufferProxy buf, byte[] input)
public static int Get(BufferProxy buf)
public static int Put(BufferProxy buf, byte input)
public static void Free(BufferProxy buf)