Package | Description |
---|---|
jnr.ffi | |
jnr.ffi.byref |
Modifier and Type | Method and Description |
---|---|
abstract Pointer |
ObjectReferenceManager.add(T object)
Adds a mapping from a java object to a unique native address.
|
static Pointer |
Memory.allocate(Runtime runtime,
int size)
Allocates a new block of java memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocate(Runtime runtime,
NativeType type)
Allocates a new block of java memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocate(Runtime runtime,
Type type)
Allocates a new block of java memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocate(Runtime runtime,
TypeAlias type)
Allocates a new block of java memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateDirect(Runtime runtime,
int size)
Allocates a new block of native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateDirect(Runtime runtime,
int size,
boolean clear)
Allocates a new block of native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateDirect(Runtime runtime,
NativeType type)
Allocates a new block of native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateDirect(Runtime runtime,
TypeAlias type)
Allocates a new block of native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateTemporary(Runtime runtime,
NativeType type)
Allocates a new block of transient native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateTemporary(Runtime runtime,
NativeType type,
boolean clear)
Allocates a new block of transient native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateTemporary(Runtime runtime,
TypeAlias type)
Allocates a new block of transient native memory and wraps it in a
Pointer
accessor. |
Pointer |
Struct.Pointer.get()
Gets the
Pointer value from the native memory. |
Pointer |
StructLayout.Pointer.get(Pointer ptr)
Gets the
Pointer value from the native memory. |
Pointer |
Struct.AbstractMember.getMemory() |
Pointer |
Struct.NumberField.getMemory() |
static Pointer |
Struct.getMemory(Struct struct) |
static Pointer |
Struct.getMemory(Struct struct,
int flags) |
Pointer[] |
Pointer.getNullTerminatedPointerArray(long offset) |
abstract Pointer |
Pointer.getPointer(long offset)
Reads an
Pointer value at the given offset. |
abstract Pointer |
Pointer.getPointer(long offset,
long size)
Reads an
Pointer value at the given offset. |
protected abstract Pointer |
Struct.String.getStringMemory() |
protected Pointer |
Struct.UTFString.getStringMemory() |
protected Pointer |
Struct.UTFStringRef.getStringMemory() |
protected abstract Pointer |
StructLayout.String.getStringMemory(Pointer ptr) |
protected Pointer |
StructLayout.UTFString.getStringMemory(Pointer ptr) |
protected Pointer |
StructLayout.UTFStringRef.getStringMemory(Pointer ptr) |
static Pointer |
Pointer.newIntPointer(Runtime runtime,
long address)
Wraps an integer value in an opaque
Pointer instance. |
Pointer |
ObjectReferenceManager.newReference(T object)
Deprecated.
|
abstract Pointer |
Pointer.slice(long offset)
Creates a new
Pointer representing a sub-region of the memory
referred to by this Pointer . |
abstract Pointer |
Pointer.slice(long offset,
long size)
Creates a new
Pointer representing a sub-region of the memory
referred to by this Pointer . |
static Pointer |
Pointer.wrap(Runtime runtime,
ByteBuffer buffer)
Wraps an existing ByteBuffer in a
Pointer implementation so it can
be used as a parameter to native functions. |
static Pointer |
Pointer.wrap(Runtime runtime,
long address)
Wraps a native address in a
Pointer instance. |
static Pointer |
Pointer.wrap(Runtime runtime,
long address,
long size)
Wraps a native address in a
Pointer instance. |
Modifier and Type | Method and Description |
---|---|
byte |
StructLayout.NumberField.byteValue(Pointer ptr)
Returns a
byte representation of this Number. |
byte |
StructLayout.Signed8.byteValue(Pointer ptr)
Returns a java byte representation of this field.
|
double |
StructLayout.NumberField.doubleValue(Pointer ptr)
Returns an
float representation of this Number. |
double |
StructLayout.Float.doubleValue(Pointer ptr) |
double |
StructLayout.Double.doubleValue(Pointer ptr) |
float |
StructLayout.NumberField.floatValue(Pointer ptr)
Returns an
float representation of this Number. |
float |
StructLayout.Float.floatValue(Pointer ptr) |
float |
StructLayout.Double.floatValue(Pointer ptr) |
void |
ObjectReferenceManager.freeReference(Pointer reference)
Deprecated.
|
void |
Pointer.get(long offset,
Pointer[] dst,
int idx,
int len)
Bulk get method for multiple
Pointer values. |
abstract boolean |
StructLayout.AbstractBoolean.get(Pointer ptr)
Gets the value for this field.
|
boolean |
StructLayout.Boolean.get(Pointer ptr) |
boolean |
StructLayout.WBOOL.get(Pointer ptr) |
long |
StructLayout.IntegerAlias.get(Pointer ptr)
Gets the value for this field.
|
byte |
StructLayout.Signed8.get(Pointer ptr)
Gets the value for this field.
|
short |
StructLayout.Unsigned8.get(Pointer ptr)
Gets the value for this field.
|
short |
StructLayout.Signed16.get(Pointer ptr)
Gets the value for this field.
|
int |
StructLayout.Unsigned16.get(Pointer ptr)
Gets the value for this field.
|
int |
StructLayout.Signed32.get(Pointer ptr)
Gets the value for this field.
|
long |
StructLayout.Unsigned32.get(Pointer ptr)
Gets the value for this field.
|
long |
StructLayout.Signed64.get(Pointer ptr)
Gets the value for this field.
|
long |
StructLayout.Unsigned64.get(Pointer ptr)
Gets the value for this field.
|
long |
StructLayout.SignedLong.get(Pointer ptr)
Gets the value for this field.
|
long |
StructLayout.UnsignedLong.get(Pointer ptr)
Gets the value for this field.
|
float |
StructLayout.Float.get(Pointer ptr) |
double |
StructLayout.Double.get(Pointer ptr) |
Pointer |
StructLayout.Pointer.get(Pointer ptr)
Gets the
Pointer value from the native memory. |
E |
StructLayout.EnumField.get(Pointer ptr)
Gets a java Enum value representing the native integer value.
|
abstract String |
StructLayout.String.get(Pointer ptr) |
String |
StructLayout.UTFString.get(Pointer ptr) |
String |
StructLayout.UTFStringRef.get(Pointer ptr) |
abstract T |
ObjectReferenceManager.get(Pointer reference)
Gets the java object that is mapped to the native memory address referred to by
reference . |
T |
ObjectReferenceManager.getObject(Pointer reference)
Deprecated.
|
protected abstract Pointer |
StructLayout.String.getStringMemory(Pointer ptr) |
protected Pointer |
StructLayout.UTFString.getStringMemory(Pointer ptr) |
protected Pointer |
StructLayout.UTFStringRef.getStringMemory(Pointer ptr) |
abstract int |
StructLayout.NumberField.intValue(Pointer ptr)
Returns a
int representation of this Number. |
int |
StructLayout.IntegerAlias.intValue(Pointer ptr) |
int |
StructLayout.Signed8.intValue(Pointer ptr)
Returns a java int representation of this field.
|
int |
StructLayout.Unsigned8.intValue(Pointer ptr)
Returns a java int representation of this field.
|
int |
StructLayout.Signed16.intValue(Pointer ptr)
Returns a java int representation of this field.
|
int |
StructLayout.Unsigned16.intValue(Pointer ptr)
Returns a java int representation of this field.
|
int |
StructLayout.Signed32.intValue(Pointer ptr)
Returns a java int representation of this field.
|
int |
StructLayout.Unsigned32.intValue(Pointer ptr)
Returns a java int representation of this field.
|
int |
StructLayout.Signed64.intValue(Pointer ptr)
Returns a java int representation of this field.
|
int |
StructLayout.Unsigned64.intValue(Pointer ptr)
Returns a java int representation of this field.
|
int |
StructLayout.SignedLong.intValue(Pointer ptr)
Returns a java int representation of this field.
|
int |
StructLayout.UnsignedLong.intValue(Pointer ptr)
Returns a java int representation of this field.
|
int |
StructLayout.Float.intValue(Pointer ptr) |
int |
StructLayout.Double.intValue(Pointer ptr) |
int |
StructLayout.Pointer.intValue(Pointer ptr)
Returns an integer representation of this
Pointer . |
int |
StructLayout.Enum8.intValue(Pointer ptr)
Returns an integer representation of this enum field.
|
int |
StructLayout.Enum16.intValue(Pointer ptr) |
int |
StructLayout.Enum32.intValue(Pointer ptr) |
int |
StructLayout.Enum64.intValue(Pointer ptr) |
int |
StructLayout.EnumLong.intValue(Pointer ptr) |
long |
StructLayout.NumberField.longValue(Pointer ptr)
Returns a
long representation of this Number. |
long |
StructLayout.IntegerAlias.longValue(Pointer ptr) |
long |
StructLayout.Unsigned32.longValue(Pointer ptr)
Returns a java long representation of this field.
|
long |
StructLayout.Signed64.longValue(Pointer ptr)
Returns a java long representation of this field.
|
long |
StructLayout.Unsigned64.longValue(Pointer ptr)
Returns a java long representation of this field.
|
long |
StructLayout.SignedLong.longValue(Pointer ptr)
Returns a java long representation of this field.
|
long |
StructLayout.UnsignedLong.longValue(Pointer ptr)
Returns a java long representation of this field.
|
long |
StructLayout.Float.longValue(Pointer ptr) |
long |
StructLayout.Double.longValue(Pointer ptr) |
long |
StructLayout.Pointer.longValue(Pointer ptr)
Returns an
long representation of this Pointer . |
long |
StructLayout.Enum64.longValue(Pointer ptr) |
long |
StructLayout.EnumLong.longValue(Pointer ptr) |
void |
Pointer.put(long offset,
Pointer[] src,
int idx,
int len)
Bulk put method for multiple
Pointer values. |
abstract void |
Pointer.putPointer(long offset,
Pointer value)
Writes a
Pointer value at the given offset. |
abstract boolean |
ObjectReferenceManager.remove(Pointer reference)
Removes a mapping from java object to native pointer.
|
void |
Struct.Pointer.set(Pointer value)
Puts a
Address value into the native memory. |
abstract void |
StructLayout.AbstractBoolean.set(Pointer ptr,
boolean value)
Sets the field to a new value.
|
void |
StructLayout.Boolean.set(Pointer ptr,
boolean value) |
void |
StructLayout.WBOOL.set(Pointer ptr,
boolean value) |
void |
StructLayout.Signed8.set(Pointer ptr,
byte value)
Sets the value for this field.
|
void |
StructLayout.Double.set(Pointer ptr,
double value) |
void |
StructLayout.Enum8.set(Pointer ptr,
E value)
Sets the native integer value using a java Enum value.
|
void |
StructLayout.Enum16.set(Pointer ptr,
E value) |
void |
StructLayout.Enum32.set(Pointer ptr,
E value) |
void |
StructLayout.Enum64.set(Pointer ptr,
E value) |
void |
StructLayout.EnumLong.set(Pointer ptr,
E value) |
void |
StructLayout.Float.set(Pointer ptr,
float value) |
void |
StructLayout.Unsigned16.set(Pointer ptr,
int value)
Sets the value for this field.
|
void |
StructLayout.Signed32.set(Pointer ptr,
int value)
Sets the value for this field.
|
void |
StructLayout.IntegerAlias.set(Pointer ptr,
long value) |
void |
StructLayout.Unsigned32.set(Pointer ptr,
long value)
Sets the value for this field.
|
void |
StructLayout.Signed64.set(Pointer ptr,
long value)
Sets the value for this field.
|
void |
StructLayout.Unsigned64.set(Pointer ptr,
long value)
Sets the value for this field.
|
void |
StructLayout.SignedLong.set(Pointer ptr,
long value)
Sets the value for this field.
|
void |
StructLayout.UnsignedLong.set(Pointer ptr,
long value)
Sets the value for this field.
|
abstract void |
StructLayout.NumberField.set(Pointer ptr,
Number value)
Sets the field to a new value.
|
void |
StructLayout.IntegerAlias.set(Pointer ptr,
Number value) |
void |
StructLayout.Signed8.set(Pointer ptr,
Number value) |
void |
StructLayout.Unsigned8.set(Pointer ptr,
Number value) |
void |
StructLayout.Signed16.set(Pointer ptr,
Number value) |
void |
StructLayout.Unsigned16.set(Pointer ptr,
Number value) |
void |
StructLayout.Signed32.set(Pointer ptr,
Number value) |
void |
StructLayout.Unsigned32.set(Pointer ptr,
Number value) |
void |
StructLayout.Signed64.set(Pointer ptr,
Number value) |
void |
StructLayout.Unsigned64.set(Pointer ptr,
Number value) |
void |
StructLayout.SignedLong.set(Pointer ptr,
Number value) |
void |
StructLayout.UnsignedLong.set(Pointer ptr,
Number value) |
void |
StructLayout.Float.set(Pointer ptr,
Number value) |
void |
StructLayout.Double.set(Pointer ptr,
Number value) |
void |
StructLayout.Pointer.set(Pointer ptr,
Number value) |
void |
StructLayout.Enum8.set(Pointer ptr,
Number value) |
void |
StructLayout.Enum16.set(Pointer ptr,
Number value) |
void |
StructLayout.Enum32.set(Pointer ptr,
Number value) |
void |
StructLayout.Enum64.set(Pointer ptr,
Number value) |
void |
StructLayout.EnumLong.set(Pointer ptr,
Number value) |
void |
StructLayout.Pointer.set(Pointer ptr,
Pointer value)
Sets a
Pointer value in the native memory. |
void |
StructLayout.Unsigned8.set(Pointer ptr,
short value)
Sets the value for this field.
|
void |
StructLayout.Signed16.set(Pointer ptr,
short value)
Sets the value for this field.
|
abstract void |
StructLayout.String.set(Pointer ptr,
String value) |
void |
StructLayout.UTFString.set(Pointer ptr,
String value) |
void |
StructLayout.UTFStringRef.set(Pointer ptr,
String value) |
void |
StructLayout.Function.set(Pointer ptr,
T value) |
short |
StructLayout.NumberField.shortValue(Pointer ptr)
Returns a
short representation of this Number. |
short |
StructLayout.Signed8.shortValue(Pointer ptr)
Returns a java short representation of this field.
|
short |
StructLayout.Unsigned8.shortValue(Pointer ptr)
Returns a java short representation of this field.
|
short |
StructLayout.Signed16.shortValue(Pointer ptr)
Returns a java short representation of this field.
|
String |
StructLayout.AbstractBoolean.toString(Pointer ptr)
Returns a string representation of this
Boolean . |
String |
StructLayout.NumberField.toString(Pointer ptr)
Returns a string representation of this
Number . |
String |
StructLayout.Signed64.toString(Pointer ptr)
Returns a string representation of this field.
|
String |
StructLayout.Unsigned64.toString(Pointer ptr)
Returns a string representation of this field.
|
String |
StructLayout.SignedLong.toString(Pointer ptr)
Returns a string representation of this field.
|
String |
StructLayout.UnsignedLong.toString(Pointer ptr)
Returns a string representation of this field.
|
String |
StructLayout.Float.toString(Pointer ptr) |
String |
StructLayout.Double.toString(Pointer ptr) |
String |
StructLayout.Pointer.toString(Pointer ptr)
Returns a string representation of this
Pointer . |
String |
StructLayout.EnumField.toString(Pointer ptr)
Returns a string representation of this field.
|
String |
StructLayout.String.toString(Pointer ptr) |
abstract void |
Pointer.transferFrom(long offset,
Pointer src,
long srcOffset,
long count)
Bulk data transfer from one memory location to another.
|
abstract void |
Pointer.transferTo(long offset,
Pointer dst,
long dstOffset,
long count)
Bulk data transfer from one memory location to another.
|
void |
Struct.useMemory(Pointer address)
Uses the specified memory address as the backing store for this structure.
|
Modifier and Type | Method and Description |
---|---|
void |
IntByReference.fromNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the integer value from native memory
|
void |
ShortByReference.fromNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the short value from native memory
|
void |
FloatByReference.fromNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the float value from native memory
|
void |
PointerByReference.fromNative(Runtime runtime,
Pointer memory,
long offset) |
void |
ByReference.fromNative(Runtime runtime,
Pointer memory,
long offset)
Copies the java value from native memory
|
void |
NativeLongByReference.fromNative(Runtime runtime,
Pointer memory,
long offset)
Copies the long value from native memory
|
void |
AddressByReference.fromNative(Runtime runtime,
Pointer memory,
long offset)
Copies the address value from native memory
|
void |
LongLongByReference.fromNative(Runtime runtime,
Pointer memory,
long offset)
Copies the value from native memory
|
void |
NumberByReference.fromNative(Runtime runtime,
Pointer memory,
long offset) |
void |
DoubleByReference.fromNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the double value from native memory
|
void |
ByteByReference.fromNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the Byte value from native memory
|
void |
IntByReference.toNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the integer value to native memory
|
void |
ShortByReference.toNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the short value to native memory
|
void |
FloatByReference.toNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the float value to native memory
|
void |
PointerByReference.toNative(Runtime runtime,
Pointer memory,
long offset) |
void |
ByReference.toNative(Runtime runtime,
Pointer memory,
long offset)
Copies the java value to native memory
|
void |
NativeLongByReference.toNative(Runtime runtime,
Pointer memory,
long offset)
Copies the long value to native memory
|
void |
AddressByReference.toNative(Runtime runtime,
Pointer memory,
long offset)
Copies the address value to native memory
|
void |
LongLongByReference.toNative(Runtime runtime,
Pointer memory,
long offset)
Copies the value to native memory
|
void |
NumberByReference.toNative(Runtime runtime,
Pointer memory,
long offset) |
void |
DoubleByReference.toNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the double value to native memory
|
void |
ByteByReference.toNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the Byte value to native memory
|
Constructor and Description |
---|
PointerByReference(Pointer value)
Creates a new reference to a pointer value
|
Copyright © 2015. All rights reserved.