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(@CheckForNull char[] password)
@Nullable public static ByteBuffer byteBuffer(CharBuffer cb)
@Nullable public static ByteBuffer byteBuffer(@CheckForNull String string)
@Nullable public static char[] charArray(@CheckForNull ByteBuffer bb)
@Nullable public static CharBuffer charBuffer(@CheckForNull ByteBuffer bb)
@Nullable public static ByteBuffer copy(@CheckForNull ByteBuffer bb)
bb
- the byte buffer to copy.
The properties of this buffer remain unchanged.public static void fill(@CheckForNull 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(@CheckForNull 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(@CheckForNull ByteBuffer bb)
Copyright © 2012–2014 Schlichtherle IT Services. All rights reserved.