com.jniwrapper
Class ResizingPointer

java.lang.Object
  extended by com.jniwrapper.Parameter
      extended by com.jniwrapper.Pointer
          extended by com.jniwrapper.ResizingPointer
All Implemented Interfaces:
PointerParameter

public class ResizingPointer
extends Pointer

A pointer to an array that can be resized (reallocated) on the native side.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.jniwrapper.Pointer
Pointer.Const, Pointer.OutOnly, Pointer.Void
 
Field Summary
 
Fields inherited from class com.jniwrapper.Pointer
POINTER_LENGTH
 
Fields inherited from class com.jniwrapper.Parameter
LICENSE_TYPE, V
 
Constructor Summary
ResizingPointer(ArrayParameter array)
          Constructs a new pointer to a given array.
ResizingPointer(ArrayParameter array, boolean isNull)
          Constructs a new pointer to a given array.
 
Method Summary
 void read(DataBuffer stackBuffer, int offset, boolean invokedByCallback)
          Reads this parameter from a specified data source.
 void readArray(int count)
          Reads the resized array.
 void write(DataBuffer stackBuffer, int offset, boolean invokedByCallback)
          Writes this parameter to a specified data source.
 
Methods inherited from class com.jniwrapper.Pointer
acceptIOPerformer, asTypedPointer, asVoidPointer, castTo, castTo, checkMemHandleLength, clone, equals, getDebugInfo, getLength, getParameterClass, getPointerHandle, getReferencedObject, isNull, pop, push, read, readPointer, readReferencedObject, setExternalSource, setNull, setReferencedObject, setReferencedObject, write, writePointer, writeReferencedObject
 
Methods inherited from class com.jniwrapper.Parameter
asReturnValue, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, hashCode, indent, read, setDataBuffer, toByteArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResizingPointer

public ResizingPointer(ArrayParameter array)
Constructs a new pointer to a given array.


ResizingPointer

public ResizingPointer(ArrayParameter array,
                       boolean isNull)
Constructs a new pointer to a given array. This pointer will initially be null if isNull is true.

Method Detail

write

public void write(DataBuffer stackBuffer,
                  int offset,
                  boolean invokedByCallback)
           throws MemoryAccessViolationException
Description copied from class: Parameter
Writes this parameter to a specified data source.

Overrides:
write in class Pointer
Throws:
MemoryAccessViolationException

read

public void read(DataBuffer stackBuffer,
                 int offset,
                 boolean invokedByCallback)
          throws MemoryAccessViolationException
Description copied from class: Parameter
Reads this parameter from a specified data source.

Overrides:
read in class Pointer
Throws:
MemoryAccessViolationException

readArray

public void readArray(int count)
Reads the resized array.

Parameters:
count - a new element count.