com.kenai.jffi
Interface InvocationBuffer

All Known Implementing Classes:
HeapInvocationBuffer

public interface InvocationBuffer

A parameter buffer used when invoking a function


Method Summary
 void putAddress(long value)
          Adds a native address parameter.
 void putArray(byte[] value, int offset, int length, int flags)
          Adds a java byte array as a pointer parameter.
 void putArray(double[] value, int offset, int length, int flags)
          Adds a java double array as a pointer parameter.
 void putArray(float[] value, int offset, int length, int flags)
          Adds a java float array as a pointer parameter.
 void putArray(int[] value, int offset, int length, int flags)
          Adds a java int array as a pointer parameter.
 void putArray(long[] value, int offset, int length, int flags)
          Adds a java long array as a pointer parameter.
 void putArray(short[] value, int offset, int length, int flags)
          Adds a java short array as a pointer parameter.
 void putByte(int value)
          Adds an 8 bit integer parameter.
 void putDirectBuffer(java.nio.Buffer buffer, int offset, int length)
          Adds a java direct buffer as a pointer parameter.
 void putDouble(double value)
          Adds a 64 bit floating point parameter.
 void putFloat(float value)
          Adds a 32 bit floating point parameter.
 void putInt(int value)
          Adds a 32 bit integer parameter.
 void putLong(long value)
          Adds a 64 bit integer parameter.
 void putShort(int value)
          Adds a 16 bit integer parameter.
 void putStruct(byte[] struct, int offset)
          Adds a struct or union as a parameter.
 void putStruct(long struct)
          Adds a struct or union as a parameter.
 

Method Detail

putByte

void putByte(int value)
Adds an 8 bit integer parameter.

Parameters:
value - An 8 bit integer value to use as the parameter.

putShort

void putShort(int value)
Adds a 16 bit integer parameter.

Parameters:
value - A 16 bit integer value to use as the parameter.

putInt

void putInt(int value)
Adds a 32 bit integer parameter.

Parameters:
value - A 32 bit integer value to use as the parameter.

putLong

void putLong(long value)
Adds a 64 bit integer parameter.

Parameters:
value - A 64 bit integer value to use as the parameter.

putFloat

void putFloat(float value)
Adds a 32 bit floating point parameter.

Parameters:
value - A 32 bit floating point value to use as the parameter.

putDouble

void putDouble(double value)
Adds a 64 bit floating point parameter.

Parameters:
value - A 64 bit floating point value to use as the parameter.

putAddress

void putAddress(long value)
Adds a native address parameter.

Parameters:
value - A native address value to use as the parameter.

putArray

void putArray(byte[] value,
              int offset,
              int length,
              int flags)
Adds a java byte array as a pointer parameter.

Parameters:
value - The java array to use as the pointer parameter.
offset - The offset from the start of the array.
length - The length of the array to use.
flags - The flags to use (IN, OUT)

putArray

void putArray(short[] value,
              int offset,
              int length,
              int flags)
Adds a java short array as a pointer parameter.

Parameters:
value - The java array to use as the pointer parameter.
offset - The offset from the start of the array.
length - The length of the array to use.
flags - The flags to use (IN, OUT)

putArray

void putArray(int[] value,
              int offset,
              int length,
              int flags)
Adds a java int array as a pointer parameter.

Parameters:
value - The java array to use as the pointer parameter.
offset - The offset from the start of the array.
length - The length of the array to use.
flags - The flags to use (IN, OUT)

putArray

void putArray(long[] value,
              int offset,
              int length,
              int flags)
Adds a java long array as a pointer parameter.

Parameters:
value - The java array to use as the pointer parameter.
offset - The offset from the start of the array.
length - The length of the array to use.
flags - The flags to use (IN, OUT)

putArray

void putArray(float[] value,
              int offset,
              int length,
              int flags)
Adds a java float array as a pointer parameter.

Parameters:
value - The java array to use as the pointer parameter.
offset - The offset from the start of the array.
length - The length of the array to use.
flags - The flags to use (IN, OUT)

putArray

void putArray(double[] value,
              int offset,
              int length,
              int flags)
Adds a java double array as a pointer parameter.

Parameters:
value - The java array to use as the pointer parameter.
offset - The offset from the start of the array.
length - The length of the array to use.
flags - The flags to use (IN, OUT)

putDirectBuffer

void putDirectBuffer(java.nio.Buffer buffer,
                     int offset,
                     int length)
Adds a java direct buffer as a pointer parameter.

Parameters:
buffer - The buffer to use as a pointer argument.
offset - An offset to add to the buffer native address.
length - The length of the buffer to use.

putStruct

void putStruct(byte[] struct,
               int offset)
Adds a struct or union as a parameter. This passes the struct or union by value, not by reference.

Parameters:
struct - A java byte array with the struct contents.
offset - The offset from the start of the array.

putStruct

void putStruct(long struct)
Adds a struct or union as a parameter. This passes the struct or union by value, not by reference.

Parameters:
struct - The native address to use as the struct contents.