public final class BufferUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.CharSequence |
getCharSequence(java.nio.ByteBuffer buf,
java.nio.charset.Charset charset) |
static java.lang.CharSequence |
getCharSequence(java.nio.ByteBuffer buf,
java.nio.charset.CharsetDecoder decoder) |
static java.lang.String |
getString(java.nio.ByteBuffer buf,
java.nio.charset.Charset charset) |
static int |
indexOf(java.nio.ByteBuffer buf,
byte value) |
static int |
indexOf(java.nio.ByteBuffer buf,
int offset,
byte value) |
static int |
positionOf(java.nio.ByteBuffer buf,
byte value)
Finds the position of a byte relative to the start of the buffer.
|
static void |
putCharSequence(java.nio.ByteBuffer buf,
java.nio.charset.Charset charset,
java.lang.CharSequence value) |
static void |
putCharSequence(java.nio.ByteBuffer buf,
java.nio.charset.CharsetEncoder encoder,
java.lang.CharSequence value) |
static void |
putString(java.nio.ByteBuffer buf,
java.nio.charset.Charset charset,
java.lang.String value) |
static java.nio.ByteBuffer |
slice(java.nio.ByteBuffer buffer,
int position) |
static java.nio.ByteBuffer |
slice(java.nio.ByteBuffer buffer,
int position,
int size) |
public static void putString(java.nio.ByteBuffer buf, java.nio.charset.Charset charset, java.lang.String value)
public static java.lang.String getString(java.nio.ByteBuffer buf, java.nio.charset.Charset charset)
public static void putCharSequence(java.nio.ByteBuffer buf, java.nio.charset.Charset charset, java.lang.CharSequence value)
public static void putCharSequence(java.nio.ByteBuffer buf, java.nio.charset.CharsetEncoder encoder, java.lang.CharSequence value)
public static java.lang.CharSequence getCharSequence(java.nio.ByteBuffer buf, java.nio.charset.Charset charset)
public static java.lang.CharSequence getCharSequence(java.nio.ByteBuffer buf, java.nio.charset.CharsetDecoder decoder)
public static int positionOf(java.nio.ByteBuffer buf, byte value)
buf
- The ByteBuffer to find the value invalue
- The value to locatepublic static int indexOf(java.nio.ByteBuffer buf, byte value)
public static int indexOf(java.nio.ByteBuffer buf, int offset, byte value)
public static java.nio.ByteBuffer slice(java.nio.ByteBuffer buffer, int position)
public static java.nio.ByteBuffer slice(java.nio.ByteBuffer buffer, int position, int size)
Copyright © 2017. All rights reserved.