This class provides utility methods for passing buffers to JNI API calls.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static interface | |
| private static class | MemoryUtil.
Default implementation. |
| private static class | MemoryUtil.
Implementation using reflection on ByteBuffer. |
| private static class | MemoryUtil.
A null-terminated CharSequence. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Charset | |
| private static final MemoryUtil. | |
| private static final Charset | |
| private static final Charset |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static String | |
| public static String | |
| private static String | |
| public static String | |
| public static String | |
| private static ByteBuffer | Returns: the encoded textthe text to encode text, final Charset the charset to use for encoding charset)Wraps the specified text in a null-terminated CharBuffer and encodes it using the specified Charset. |
| private static ByteBuffer | encode(final CharBuffer in, final Charset charset)
A |
| public static ByteBuffer | Returns: the encoded text or nullthe text to encode text)Returns a ByteBuffer containing the specified text ASCII encoded and null-terminated. |
| public static ByteBuffer | Returns: the encoded textthe text to encode text)Returns a ByteBuffer containing the specified text UTF-16LE encoded and null-terminated. |
| public static ByteBuffer | Returns: the encoded text or nullthe text to encode text)Returns a ByteBuffer containing the specified text UTF-8 encoded and null-terminated. |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | Returns: the memory addressthe buffer buffer)Returns the memory address of the specified buffer. |
| public static long | |
| public static long | |
| public static long | |
| pack-priv static Field | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| public static long | |
| private static Field | |
| private static MemoryUtil. |
| ascii | back to summary |
|---|---|
| private static final Charset ascii | |
| memUtil | back to summary |
|---|---|
| private static final MemoryUtil. | |
| utf16 | back to summary |
|---|---|
| private static final Charset utf16 | |
| utf8 | back to summary |
|---|---|
| private static final Charset utf8 | |
| MemoryUtil | back to summary |
|---|---|
| private MemoryUtil() | |
| decode | back to summary |
|---|---|
| private static String decode(final ByteBuffer buffer, final Charset charset) | |
| decodeASCII | back to summary |
|---|---|
| public static String decodeASCII(final ByteBuffer buffer) | |
| decodeImpl | back to summary |
|---|---|
| private static String decodeImpl(final ByteBuffer in, final Charset charset) | |
| decodeUTF16 | back to summary |
|---|---|
| public static String decodeUTF16(final ByteBuffer buffer) | |
| decodeUTF8 | back to summary |
|---|---|
| public static String decodeUTF8(final ByteBuffer buffer) | |
| encode | back to summary |
|---|---|
| private static ByteBuffer encode(final CharSequence text, final Charset charset) Wraps the specified text in a null-terminated CharBuffer and encodes it using the specified Charset.
| |
| encode | back to summary |
|---|---|
| private static ByteBuffer encode(final CharBuffer in, final Charset charset) A | |
| encodeASCII | back to summary |
|---|---|
| public static ByteBuffer encodeASCII(final CharSequence text) Returns a ByteBuffer containing the specified text ASCII encoded and null-terminated. If text is null, null is returned.
| |
| encodeUTF16 | back to summary |
|---|---|
| public static ByteBuffer encodeUTF16(final CharSequence text) Returns a ByteBuffer containing the specified text UTF-16LE encoded and null-terminated. If text is null, null is returned.
| |
| encodeUTF8 | back to summary |
|---|---|
| public static ByteBuffer encodeUTF8(final CharSequence text) Returns a ByteBuffer containing the specified text UTF-8 encoded and null-terminated. If text is null, null is returned.
| |
| getAddress | back to summary |
|---|---|
| public static long getAddress(ByteBuffer buffer) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(ByteBuffer buffer, int position) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(ShortBuffer buffer) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(ShortBuffer buffer, int position) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(CharBuffer buffer) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(CharBuffer buffer, int position) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(IntBuffer buffer) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(IntBuffer buffer, int position) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(FloatBuffer buffer) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(FloatBuffer buffer, int position) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(LongBuffer buffer) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(LongBuffer buffer, int position) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(DoubleBuffer buffer) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(DoubleBuffer buffer, int position) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(PointerBuffer buffer) | |
| getAddress | back to summary |
|---|---|
| public static long getAddress(PointerBuffer buffer, int position) | |
| getAddress0 | back to summary |
|---|---|
| public static long getAddress0(Buffer buffer) Returns the memory address of the specified buffer. [INTERNAL USE ONLY]
| |
| getAddress0 | back to summary |
|---|---|
| public static long getAddress0(PointerBuffer buffer) | |
| getAddress0Safe | back to summary |
|---|---|
| public static long getAddress0Safe(Buffer buffer) | |
| getAddress0Safe | back to summary |
|---|---|
| public static long getAddress0Safe(PointerBuffer buffer) | |
| getAddressField | back to summary |
|---|---|
| pack-priv static Field getAddressField() throws NoSuchFieldException | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(ByteBuffer buffer) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(ByteBuffer buffer, int position) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(ShortBuffer buffer) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(ShortBuffer buffer, int position) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(CharBuffer buffer) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(CharBuffer buffer, int position) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(IntBuffer buffer) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(IntBuffer buffer, int position) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(FloatBuffer buffer) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(FloatBuffer buffer, int position) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(LongBuffer buffer) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(LongBuffer buffer, int position) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(DoubleBuffer buffer) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(DoubleBuffer buffer, int position) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(PointerBuffer buffer) | |
| getAddressSafe | back to summary |
|---|---|
| public static long getAddressSafe(PointerBuffer buffer, int position) | |
| getDeclaredFieldRecursive | back to summary |
|---|---|
| private static Field getDeclaredFieldRecursive(final Class<?> root, final String fieldName) throws NoSuchFieldException | |
| loadAccessor | back to summary |
|---|---|
| private static MemoryUtil. | |
| Modifier and Type | Method and Description |
|---|---|
| public long |
| getAddress | back to summary |
|---|---|
| public long getAddress(Buffer buffer) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public long |
| AccessorJNI | back to summary |
|---|---|
| private AccessorJNI() | |
| getAddress | back to summary |
|---|---|
| public long getAddress(final Buffer buffer) Implements org. | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long |
| address | back to summary |
|---|---|
| private final Field address | |
| AccessorReflect | back to summary |
|---|---|
| pack-priv AccessorReflect() | |
| getAddress | back to summary |
|---|---|
| public long getAddress(final Buffer buffer) Implements org. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final CharSequence |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public char | charAt(final int
the index of the index)char value to be returnedImplements java. char value at the specified index.
|
| public int | |
| public CharSequence | subSequence(final int
the start index, inclusive start, final int the end index, exclusive end)Implements java. CharSequence that is a subsequence of this sequence.
|
| source | back to summary |
|---|---|
| pack-priv final CharSequence source | |
| CharSequenceNT | back to summary |
|---|---|
| pack-priv CharSequenceNT(CharSequence source) | |
| charAt | back to summary |
|---|---|
| public char charAt(final int index) Implements java. Doc from java. Returns the If the
| |
| length | back to summary |
|---|---|
| public int length() Implements java. Doc from java. Returns the length of this character sequence. The length is the number
of 16-bit
| |
| subSequence | back to summary |
|---|---|
| public CharSequence subSequence(final int start, final int end) Implements java. Doc from java. Returns a
| |