JNative project : see http://jnative.sf.net


org.xvolks.jnative.pointers
Class NullPointer

java.lang.Object
  extended by org.xvolks.jnative.pointers.Pointer
      extended by org.xvolks.jnative.pointers.NullPointer

public class NullPointer
extends Pointer

$Id: NullPointer.java,v 1.3 2006/01/14 19:27:01 mdenty Exp $;

This class encapsulate a native NULL pointer.


This software is released under the GPL.


Constructor Summary
NullPointer()
          Constructor creates a null Pointer with a size of allocated memory set to zero
 
Method Summary
 void dispose()
          Method dispose does nothing because there is no need to free some memory
 byte getAsByte(int offset)
          Method getAsByte
 int getAsInt(int offset)
          Method getAsInt
 long getAsLong(int offset)
          Method getAsLong
 short getAsShort(int offset)
          Method getAsShort
 java.lang.String getAsString()
          Method getAsString
 byte[] getMemory()
          Method getMemory
 int setByteAt(int offset, byte value)
          Method setByteAt
 int setIntAt(int offset, int value)
          Method setIntAt
 int setLongAt(int offset, int value)
          Method setLongAt
 void setMemory(byte[] buffer)
          Method setMemory
 void setMemory(java.lang.String buffer)
          Method setMemory
 int setShortAt(int offset, short value)
          Method setShortAt
 int setStringAt(int offset, java.lang.String value)
          Method setStringAt
 void zeroMemory()
          Method zeroMemory
 
Methods inherited from class org.xvolks.jnative.pointers.Pointer
finalize, getPointer, getSize, setLongAt
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullPointer

public NullPointer()
Constructor creates a null Pointer with a size of allocated memory set to zero

Method Detail

dispose

public void dispose()
Method dispose does nothing because there is no need to free some memory

Overrides:
dispose in class Pointer

getAsByte

public byte getAsByte(int offset)
               throws NativeException
Method getAsByte

Overrides:
getAsByte in class Pointer
Parameters:
offset - not used
Returns:
nothing
Throws:
NativeException
java.lang.NullPointerException - allways

getAsInt

public int getAsInt(int offset)
             throws NativeException
Method getAsInt

Overrides:
getAsInt in class Pointer
Parameters:
offset - not used
Returns:
nothing
Throws:
NativeException
java.lang.NullPointerException - allways

getAsLong

public long getAsLong(int offset)
               throws NativeException
Method getAsLong

Overrides:
getAsLong in class Pointer
Parameters:
offset - not used
Returns:
nothing
Throws:
NativeException
java.lang.NullPointerException - allways

getAsShort

public short getAsShort(int offset)
                 throws NativeException
Method getAsShort

Overrides:
getAsShort in class Pointer
Parameters:
offset - not used
Returns:
nothing
Throws:
NativeException
java.lang.NullPointerException - allways

getAsString

public java.lang.String getAsString()
                             throws NativeException
Method getAsString

Overrides:
getAsString in class Pointer
Returns:
nothing
Throws:
NativeException
java.lang.NullPointerException - allways

getMemory

public byte[] getMemory()
                 throws NativeException
Method getMemory

Overrides:
getMemory in class Pointer
Returns:
nothing
Throws:
NativeException
java.lang.NullPointerException - allways

setByteAt

public int setByteAt(int offset,
                     byte value)
              throws NativeException
Method setByteAt

Overrides:
setByteAt in class Pointer
Parameters:
offset - not used
value - not used
Returns:
nothing
Throws:
NativeException
java.lang.NullPointerException - allways

setIntAt

public int setIntAt(int offset,
                    int value)
             throws NativeException
Method setIntAt

Overrides:
setIntAt in class Pointer
Parameters:
offset - not used
value - not used
Returns:
nothing
Throws:
NativeException
java.lang.NullPointerException - allways

setLongAt

public int setLongAt(int offset,
                     int value)
              throws NativeException
Method setLongAt

Parameters:
offset - not used
value - not used
Returns:
nothing
Throws:
NativeException
java.lang.NullPointerException - allways

setMemory

public void setMemory(java.lang.String buffer)
               throws NativeException
Method setMemory

Overrides:
setMemory in class Pointer
Parameters:
buffer - not used
Throws:
NativeException
java.lang.NullPointerException - allways

setMemory

public void setMemory(byte[] buffer)
               throws NativeException
Method setMemory

Overrides:
setMemory in class Pointer
Parameters:
buffer - not used
Throws:
NativeException
java.lang.NullPointerException - allways

setShortAt

public int setShortAt(int offset,
                      short value)
               throws NativeException
Method setShortAt

Overrides:
setShortAt in class Pointer
Parameters:
offset - not used
value - not used
Returns:
nothing
Throws:
NativeException
java.lang.NullPointerException - allways

setStringAt

public int setStringAt(int offset,
                       java.lang.String value)
                throws NativeException
Method setStringAt

Overrides:
setStringAt in class Pointer
Parameters:
offset - not used
value - not used
Returns:
nothing
Throws:
NativeException
java.lang.NullPointerException - allways

zeroMemory

public void zeroMemory()
                throws NativeException
Method zeroMemory

Overrides:
zeroMemory in class Pointer
Throws:
java.lang.NullPointerException - allways
NativeException

JNative project : see http://jnative.sf.net