Modifier and Type | Method and Description |
---|---|
static ByteBuffer |
ByteBuffer.allocate(int capacity)
Allocates a new ByteBuffer instance.
|
ByteBuffer |
ByteBuffer.clear()
Clears the buffer.
|
ByteBuffer |
ByteBuffer.compact()
Compacts the buffer by removing leading bytes up to the buffer position, and
decrements the limit and position values accordingly.
|
static ByteBuffer |
ByteBuffer.create()
Creates a new ByteBuffer instance.
|
static ByteBuffer |
ByteBuffer.create(com.google.gwt.core.client.JsArrayInteger[] bytes)
Creates a new ByteBuffer instance with bytes as underlying array.
|
ByteBuffer |
ByteBuffer.duplicate()
Duplicates the buffer by reusing the underlying byte array but with independent
position, limit and capacity.
|
ByteBuffer |
Charset.encode(String text,
ByteBuffer body) |
ByteBuffer |
ByteBuffer.expand(int expectedRemaining)
Expands the buffer to support the expected number of remaining bytes after the current position.
|
ByteBuffer |
ByteBuffer.expandAt(int i,
int expectedRemaining)
Expands the buffer to support the expected number of remaining bytes at the specified index.
|
ByteBuffer |
ByteBuffer.fill(int size)
Fills the buffer with a repeated number of zeros.
|
ByteBuffer |
ByteBuffer.fillWith(byte b,
int size)
Fills the buffer with a specific number of repeated bytes.
|
ByteBuffer |
ByteBuffer.flip()
Flips the buffer.
|
ByteBuffer |
WebSocket.MessageEvent.getDataAsByteBuffer() |
protected ByteBuffer |
NativeMessageEvent.getDataAsByteBuffer() |
ByteBuffer |
ByteBuffer.mark()
Marks a position in the buffer.
|
ByteBuffer |
ByteBuffer.put(byte v)
Puts a single byte number into the buffer at the current position.
|
ByteBuffer |
ByteBuffer.putAt(int i,
byte v)
Puts a single byte number into the buffer at the specified index.
|
ByteBuffer |
ByteBuffer.putBuffer(ByteBuffer v)
Puts a buffer into the buffer at the current position.
|
ByteBuffer |
ByteBuffer.putBufferAt(int i,
ByteBuffer v)
Puts a buffer into the buffer at the specified index.
|
ByteBuffer |
ByteBuffer.putBytes(byte[] v)
Puts a single-byte array into the buffer at the current position.
|
ByteBuffer |
ByteBuffer.putBytesAt(int i,
byte[] v)
Puts a byte array into the buffer at the specified index.
|
ByteBuffer |
ByteBuffer.putInt(int v)
Puts a 4-byte number into the buffer at the current position.
|
ByteBuffer |
ByteBuffer.putIntAt(int i,
int v)
Puts a 4-byte number into the buffer at the specified index.
|
ByteBuffer |
ByteBuffer.putLong(long v)
Puts a 8-byte number into the buffer at the current position.
|
ByteBuffer |
ByteBuffer.putLongAt(int i,
long v)
Puts a 8-byte number into the buffer at the specified index.
|
ByteBuffer |
ByteBuffer.putMediumInt(int v)
Puts a 3-byte number into the buffer at the current position.
|
ByteBuffer |
ByteBuffer.putMediumIntAt(int i,
int v)
Puts a 3-byte number into the buffer at the specified index.
|
ByteBuffer |
ByteBuffer.putPrefixedString(int fieldSize,
int v,
Charset cs)
Puts a string into the buffer at the specified index, using the character set to
encode the string as bytes.
|
ByteBuffer |
ByteBuffer.putShort(short v)
Puts a 2-byte number into the buffer at the current position.
|
ByteBuffer |
ByteBuffer.putShortAt(int i,
short v)
Puts a 2-byte number into the buffer at the specified index.
|
ByteBuffer |
ByteBuffer.putString(String v,
Charset cs)
Puts a string into the buffer at the current position, using the character set to
encode the string as bytes.
|
ByteBuffer |
ByteBuffer.putUnsignedShort(short v)
Puts a two-byte array into the buffer at the current position.
|
ByteBuffer |
ByteBuffer.reset()
Resets the buffer position using the mark.
|
ByteBuffer |
ByteBuffer.rewind()
Rewinds the buffer.
|
ByteBuffer |
ByteBuffer.skip(int size)
Skips the specified number of bytes from the current position.
|
ByteBuffer |
ByteBuffer.slice()
Returns a sliced buffer, setting the position to zero, and decrementing the limit accordingly.
|
static ByteBuffer |
ByteBuffer.wrap(byte[] bytes)
Wraps a byte array as a new ByteBuffer instance.
|
Modifier and Type | Method and Description |
---|---|
String |
Charset.decode(ByteBuffer body) |
static String |
Base64Util.encode(ByteBuffer buffer) |
ByteBuffer |
Charset.encode(String text,
ByteBuffer body) |
ByteBuffer |
ByteBuffer.putBuffer(ByteBuffer v)
Puts a buffer into the buffer at the current position.
|
ByteBuffer |
ByteBuffer.putBufferAt(int i,
ByteBuffer v)
Puts a buffer into the buffer at the specified index.
|
void |
WebSocket.send(ByteBuffer data)
Sends binary-based data to the remote socket location.
|
Copyright © 2015. All Rights Reserved.