public final class Buffers extends Object
| Modifier and Type | Method and Description |
|---|---|
static ByteBuffer |
byteBuffer(char[] password) |
static ByteBuffer |
byteBuffer(CharBuffer cb) |
static ByteBuffer |
byteBuffer(String string) |
static char[] |
charArray(ByteBuffer bb) |
static CharBuffer |
charBuffer(ByteBuffer bb) |
static ByteBuffer |
copy(ByteBuffer bb)
Copies the given byte buffer into a new direct byte buffer.
|
static void |
fill(ByteBuffer bb,
byte value)
Overwrites the remaining bytes of the given byte buffer with the
given value.
|
static void |
fill(CharBuffer cb,
char value)
Overwrites the remaining characters of the given char buffer with the
given value.
|
static String |
string(ByteBuffer bb) |
@Nullable public static ByteBuffer byteBuffer(@Nullable char[] password)
@Nullable public static ByteBuffer byteBuffer(@Nullable CharBuffer cb)
@Nullable public static ByteBuffer byteBuffer(@Nullable String string)
@Nullable public static char[] charArray(@Nullable ByteBuffer bb)
@Nullable public static CharBuffer charBuffer(@Nullable ByteBuffer bb)
@Nullable public static ByteBuffer copy(@Nullable ByteBuffer bb)
bb - the byte buffer to copy.
The properties of this buffer remain unchanged.public static void fill(@Nullable ByteBuffer bb, byte value)
bb - the byte buffer to fill.
The properties of this buffer remain unchanged.value - the byte value to use for filling the buffer.public static void fill(@Nullable CharBuffer cb, char value)
cb - the char buffer to fill.
The properties of this buffer remain unchanged.value - the char value to use for filling the buffer.@Nullable public static String string(@Nullable ByteBuffer bb)
Copyright © 2012–2015 Schlichtherle IT Services. All rights reserved.