public class ByteBuffer
extends java.lang.Object
| Constructor and Description |
|---|
ByteBuffer()
Creates a new
ByteBuffer-object |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
get()
Returns the entire buffer.
|
int |
get(byte[] output,
int offset,
int num)
Transferse up to
num bytes to the output buffer
starting at offset. |
byte[] |
get(int num)
Returns up to
num bytes from this ByteBuffer. |
boolean |
isEmpty()
Checks if the buffer is empty.
|
int |
length()
Returns the number of bytes in the queue.
|
void |
put(byte b)
Puts one byte at the end of the buffer
to be optimized.
|
void |
put(byte[] bytes)
Puts the bytes at the end of the buffer
|
void |
put(byte[] input,
int offset,
int len)
Puts
length bytes from input starting at
offset to the end of this buffer. |
void |
reset()
Resets this
ByteBuffer and clears the internal storage. |
public void reset()
ByteBuffer and clears the internal storage.public byte[] get()
public byte[] get(int num)
num bytes from this ByteBuffer.num - the number of bytes to returnpublic int get(byte[] output,
int offset,
int num)
num bytes to the output buffer
starting at offset.output - the output bufferoffset - the offsetlength - the number of bytes to transferpublic void put(byte[] input,
int offset,
int len)
length bytes from input starting at
offset to the end of this buffer.input - the input bufferoffset - the offset into the input bufferlength - the number of bytes to transferpublic void put(byte[] bytes)
bytes - the bytes to add to the bufferpublic void put(byte b)
public int length()
public boolean isEmpty()
true if the buffer is empty;
false otherwise."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"