be.cardon.nativecall
Class NativeInt

java.lang.Object
  extended by be.cardon.nativecall.NativeObject
      extended by be.cardon.nativecall.NativeInt

public class NativeInt
extends NativeObject

Wrapped class for native int type. Class with read only support.


Field Summary
static int LengthInBytes
           
 
Fields inherited from class be.cardon.nativecall.NativeObject
BYTE_SIZE, INT_SIZE, LLC
 
Constructor Summary
NativeInt()
          allocates a new integer
NativeInt(int address)
          existing integer.
NativeInt(int address, boolean readOnly)
          existing integer, with protection or not.
 
Method Summary
 int get()
          return the native int value.
static NativeInt newInstance(NativeObject obj)
          Convert a NativeObject in a nativeInt.
 void set(int value)
          set the native int value.
 
Methods inherited from class be.cardon.nativecall.NativeObject
finalize, getAddress, getLength, isReadOnly, setReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LengthInBytes

public static final int LengthInBytes
See Also:
Constant Field Values
Constructor Detail

NativeInt

public NativeInt()
          throws NativeCallException
allocates a new integer

Throws:
NativeCallException

NativeInt

public NativeInt(int address)
          throws NativeCallException
existing integer.

Throws:
NativeCallException

NativeInt

public NativeInt(int address,
                 boolean readOnly)
          throws NativeCallException
existing integer, with protection or not.

Throws:
NativeCallException
Method Detail

newInstance

public static NativeInt newInstance(NativeObject obj)
                             throws NativeCallException
Convert a NativeObject in a nativeInt. The size of the native object must match the size of NativeInt.

Throws:
NativeCallException

get

public int get()
        throws NativeCallException
return the native int value.

Throws:
NativeCallException

set

public void set(int value)
         throws NativeCallException
set the native int value.

Throws:
NativeCallException