com.jniwrapper
Interface MemoryBuffer

All Superinterfaces:
DataBuffer
All Known Implementing Classes:
ParameterBufferImpl

public interface MemoryBuffer
extends DataBuffer

Data source associated with an allocated native memory block.


Method Summary
 long getHandle()
          Returns native memory handle (usually block address).
 int getLength()
          Returns the length of allocated memory block.
 void setupReallocation(long reallocatedHandle, int newSize)
          Sets new handle and size after this block has been reallocated outside of this block's code.
 
Methods inherited from interface com.jniwrapper.DataBuffer
readByte, readByteArray, readByteArray, readCallbackReference, readInt, readLong, readPointer, readShort, resize, writeByte, writeByteArray, writeByteArray, writeCallbackReference, writeInt, writeLong, writePointer, writeShort
 

Method Detail

getHandle

long getHandle()
Returns native memory handle (usually block address).


getLength

int getLength()
Returns the length of allocated memory block. Memory access methods may check that all accessed data is within allocated bounds, but this is not guaranteed.


setupReallocation

void setupReallocation(long reallocatedHandle,
                       int newSize)
Sets new handle and size after this block has been reallocated outside of this block's code.