jnr.ffi.util
Class BufferUtil
java.lang.Object
jnr.ffi.util.BufferUtil
public final class BufferUtil
- extends java.lang.Object
|
Method Summary |
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 |
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
putString
public static final void putString(java.nio.ByteBuffer buf,
java.nio.charset.Charset charset,
java.lang.String value)
getString
public static final java.lang.String getString(java.nio.ByteBuffer buf,
java.nio.charset.Charset charset)
putCharSequence
public static final void putCharSequence(java.nio.ByteBuffer buf,
java.nio.charset.Charset charset,
java.lang.CharSequence value)
putCharSequence
public static final void putCharSequence(java.nio.ByteBuffer buf,
java.nio.charset.CharsetEncoder encoder,
java.lang.CharSequence value)
getCharSequence
public static final java.lang.CharSequence getCharSequence(java.nio.ByteBuffer buf,
java.nio.charset.Charset charset)
getCharSequence
public static final java.lang.CharSequence getCharSequence(java.nio.ByteBuffer buf,
java.nio.charset.CharsetDecoder decoder)
positionOf
public static final int positionOf(java.nio.ByteBuffer buf,
byte value)
- Finds the position of a byte relative to the start of the buffer.
- Parameters:
buf - The ByteBuffer to find the value invalue - The value to locate
- Returns:
- The position within the buffer that value is found, or -1 if not
found.
indexOf
public static final int indexOf(java.nio.ByteBuffer buf,
byte value)
slice
public static java.nio.ByteBuffer slice(java.nio.ByteBuffer buffer,
int position)
slice
public static java.nio.ByteBuffer slice(java.nio.ByteBuffer buffer,
int position,
int size)
Copyright © 2012. All Rights Reserved.