Logo Search packages:      
Sourcecode: libjna-java version File versions  Download package

com::sun::jna::Pointer Class Reference

Inheritance diagram for com::sun::jna::Pointer:

com::sun::jna::Function com::sun::jna::Memory com::sun::jna::Pointer::Opaque com::sun::jna::Memory::SharedMemory com::sun::jna::StringArray

List of all members.


Detailed Description

An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a native pointer. The native pointer could be any type of native pointer. Methods such as write, read, getXXX, and setXXX, provide means to access memory underlying the native pointer.

The constructors are intentionally package-private, since it's not generally a good idea to be creating C pointers de novo.

Author:
Sheng Liang, originator

Todd Fast, suitability modifications

Timothy Wall, robust library loading

See also:
Function

Definition at line 31 of file Pointer.java.


Public Member Functions

boolean equals (Object o)
byte getByte (long offset)
byte[] getByteArray (long offset, int arraySize)
ByteBuffer getByteBuffer (long offset, long length)
char getChar (long offset)
char[] getCharArray (long offset, int arraySize)
double getDouble (long offset)
double[] getDoubleArray (long offset, int arraySize)
float getFloat (long offset)
float[] getFloatArray (long offset, int arraySize)
int getInt (long offset)
int[] getIntArray (long offset, int arraySize)
long getLong (long offset)
long[] getLongArray (long offset, int arraySize)
NativeLong getNativeLong (long offset)
Pointer getPointer (long offset)
Pointer[] getPointerArray (long offset, int arraySize)
short getShort (long offset)
short[] getShortArray (long offset, int arraySize)
String getString (long offset)
String getString (long offset, boolean wide)
int hashCode ()
long indexOf (long offset, byte value)
void read (long offset, Pointer[] buf, int index, int length)
void read (long offset, double[] buf, int index, int length)
void read (long offset, float[] buf, int index, int length)
void read (long offset, long[] buf, int index, int length)
void read (long offset, int[] buf, int index, int length)
void read (long offset, char[] buf, int index, int length)
void read (long offset, short[] buf, int index, int length)
void read (long offset, byte[] buf, int index, int length)
void setByte (long offset, byte value)
void setChar (long offset, char value)
void setDouble (long offset, double value)
void setFloat (long offset, float value)
void setInt (long offset, int value)
void setLong (long offset, long value)
void setMemory (long offset, long length, byte value)
void setNativeLong (long offset, NativeLong value)
void setPointer (long offset, Pointer value)
void setShort (long offset, short value)
void setString (long offset, String value)
void setString (long offset, String value, boolean wide)
Pointer share (long offset, long sz)
Pointer share (long offset)
String toString ()
void write (long bOff, Pointer[] buf, int index, int length)
void write (long offset, double[] buf, int index, int length)
void write (long offset, float[] buf, int index, int length)
void write (long offset, long[] buf, int index, int length)
void write (long offset, int[] buf, int index, int length)
void write (long offset, char[] buf, int index, int length)
void write (long offset, short[] buf, int index, int length)
void write (long offset, byte[] buf, int index, int length)

Static Public Member Functions

static final Pointer createConstant (long peer)

Static Public Attributes

static final Pointer NULL = null
static final int SIZE

Package Functions

void clear (long size)
 Pointer (long peer)
 Pointer ()

Static Package Functions

 [static initializer]

Package Attributes

long peer

Private Member Functions

native ByteBuffer _getDirectByteBuffer (long addr, long length)
native float _getFloat (long addr)

Static Private Member Functions

static native byte _getByte (long addr)
static native char _getChar (long addr)
static native double _getDouble (long addr)
static native int _getInt (long addr)
static native long _getLong (long addr)
static native Pointer _getPointer (long addr)
static native short _getShort (long addr)
static native String _getString (long addr, boolean wide)
static native long _indexOf (long addr, byte value)
static native void _read (long addr, double[] buf, int index, int length)
static native void _read (long addr, float[] buf, int index, int length)
static native void _read (long addr, long[] buf, int index, int length)
static native void _read (long addr, int[] buf, int index, int length)
static native void _read (long addr, char[] buf, int index, int length)
static native void _read (long addr, short[] buf, int index, int length)
static native void _read (long addr, byte[] buf, int index, int length)
static native void _setByte (long addr, byte value)
static native void _setChar (long addr, char value)
static native void _setDouble (long addr, double value)
static native void _setFloat (long addr, float value)
static native void _setInt (long addr, int value)
static native void _setLong (long addr, long value)
static native void _setMemory (long addr, long length, byte value)
static native void _setPointer (long addr, long value)
static native void _setShort (long addr, short value)
static native void _setString (long addr, String value, boolean wide)
static native void _write (long addr, double[] buf, int index, int length)
static native void _write (long addr, float[] buf, int index, int length)
static native void _write (long addr, long[] buf, int index, int length)
static native void _write (long addr, int[] buf, int index, int length)
static native void _write (long addr, char[] buf, int index, int length)
static native void _write (long addr, short[] buf, int index, int length)
static native void _write (long addr, byte[] buf, int index, int length)

Classes

class  Opaque

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index