public final class BufferUtils extends Object
Modifier and Type | Method and Description |
---|---|
static ByteBuffer |
ensureCapacity(ByteBuffer buffer,
int capacity)
Ensure the byte buffer's capacity.
|
static CharBuffer |
ensureCapacity(CharBuffer buffer,
int capacity)
Ensure the char buffer's capacity.
|
static String |
toString(ByteBuffer sequence)
Convert a byte buffer to a string in platform default encoding.
|
public static ByteBuffer ensureCapacity(ByteBuffer buffer, int capacity)
buffer
- The buffer to check or null
if a new buffer
should be allocated.public static CharBuffer ensureCapacity(CharBuffer buffer, int capacity)
buffer
- The buffer to check or null
if a new buffer
should be allocated.public static String toString(ByteBuffer sequence)
Copyright © 2016. All rights reserved.