public class ExternalArrayPointer extends Pointer
Memory allocated to this array is considered external
and, therefore, cannot be reallocated and will not be freed by JNIWrapper.
If the passed array is correctly reallocated by the caller, use ResizingPointer
instead of this class.
Pointer.Const, Pointer.OutOnly, Pointer.VoidPOINTER_LENGTHLICENSE_TYPE, V| Constructor and Description |
|---|
ExternalArrayPointer(ArrayParameter array)
Constructs a new pointer to the given array.
|
ExternalArrayPointer(ArrayParameter array,
boolean isNull)
Constructs a new pointer to the given array.
|
| Modifier and Type | Method and Description |
|---|---|
Parameter |
getReferencedObject()
Returns the referenced object of this pointer.
|
void |
read(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Reads this parameter from a specified data source.
|
void |
readArray(int count)
Reads the resized array.
|
protected void |
readReferencedObject(boolean invokedByCallback)
Reads the referenced object only.
|
protected void |
setExternalSource(long newHandle,
int length)
Makes this pointer use external (unmanaged) memory area.
|
void |
write(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Writes this parameter to a specified data source.
|
acceptIOPerformer, asTypedPointer, asVoidPointer, castTo, castTo, checkMemHandleLength, clone, equals, getDebugInfo, getLength, getParameterClass, getPointerHandle, isNull, pop, push, read, readPointer, setNull, setReferencedObject, setReferencedObject, write, writePointer, writeReferencedObjectasReturnValue, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, hashCode, indent, read, setDataBuffer, toByteArraypublic ExternalArrayPointer(ArrayParameter array)
public ExternalArrayPointer(ArrayParameter array, boolean isNull)
array - isNull - the pointer passed to the function will be initially null
if this parameter is true true.public void read(DataBuffer stackBuffer, int offset, boolean invokedByCallback) throws MemoryAccessViolationException
Parameterread in class PointerMemoryAccessViolationExceptionpublic void write(DataBuffer stackBuffer, int offset, boolean invokedByCallback) throws MemoryAccessViolationException
Parameterwrite in class PointerMemoryAccessViolationExceptionprotected void readReferencedObject(boolean invokedByCallback)
PointerreadReferencedObject in class Pointerpublic Parameter getReferencedObject()
PointergetReferencedObject in class Pointerprotected void setExternalSource(long newHandle,
int length)
PointersetExternalSource in class PointernewHandle - memory handlelength - known allocated lengthpublic void readArray(int count)
count - new element count.