|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jniwrapper.ParameterDataBuffer
com.jniwrapper.ParameterBufferImpl
| Method Summary | |
static MemoryBuffer |
allocate(int amount)
|
static MemoryBuffer |
createExternMemorySource(long handle,
int amount)
|
java.nio.ByteBuffer |
getBuffer()
|
long |
getHandle()
Returns native memory handle (usually block address). |
int |
getLength()
Returns the length of allocated memory block. |
byte |
readByte(int offset)
Reads a byte at a given offset. |
void |
readByteArray(int offset,
byte[] dstArray,
int dstOffset,
int length)
Copies data from this source to an array. |
byte[] |
readByteArray(int offset,
int length)
Reads the length bytes from this source. |
long |
readCallbackReference(int offset)
Reads a callback reference (pointer) at a given offset. |
int |
readInt(int offset)
Reads an int (2-byte signed) value at a given offset. |
long |
readLong(int offset)
Reads a long (8-byte signed) value at a given offset. |
long |
readPointer(int offset)
Reads a pointer value at a given offset. |
short |
readShort(int offset)
Reads a short (2-byte signed) value at a given offset. |
void |
resize(int newSize)
Resizes this source so that it can hold the newSize bytes. |
void |
setupReallocation(long reallocatedHandle,
int newSize)
Sets new handle and size after this block has been reallocated outside of this block's code. |
void |
writeByte(int offset,
byte val)
Writes a single byte at a given offset. |
void |
writeByteArray(int offset,
byte[] val)
Copies all data from a given array to this source. |
void |
writeByteArray(int offset,
byte[] val,
int srcOffset,
int length)
Copies data from an array to this source. |
void |
writeCallbackReference(int offset,
long val)
Writes a callback reference (pointer) at a given offset. |
void |
writeInt(int offset,
int val)
Writes an int (4-byte signed) value at a given offset. |
void |
writeLong(int offset,
long val)
Writes a long (8-byte signed) value at a given offset. |
void |
writePointer(int offset,
long val)
Writes a pointer value at a given offset. |
void |
writeShort(int offset,
short val)
Writes a short (2-byte signed) value at a given offset. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.jniwrapper.DataBuffer |
readByte, readByteArray, readByteArray, readCallbackReference, readInt, readLong, readPointer, readShort, writeByte, writeByteArray, writeByteArray, writeCallbackReference, writeInt, writeLong, writePointer, writeShort |
| Method Detail |
public long getHandle()
MemoryBuffer
getHandle in interface MemoryBufferpublic int getLength()
MemoryBuffer
getLength in interface MemoryBufferpublic void resize(int newSize)
DataBuffernewSize bytes.
resize in interface DataBuffer
public void setupReallocation(long reallocatedHandle,
int newSize)
MemoryBuffer
setupReallocation in interface MemoryBufferpublic static MemoryBuffer allocate(int amount)
public static MemoryBuffer createExternMemorySource(long handle,
int amount)
public java.nio.ByteBuffer getBuffer()
public void writeByte(int offset,
byte val)
DataBuffer
writeByte in interface DataBufferpublic byte readByte(int offset)
DataBuffer
readByte in interface DataBuffer
public void writeShort(int offset,
short val)
DataBuffer
writeShort in interface DataBufferpublic short readShort(int offset)
DataBuffer
readShort in interface DataBuffer
public void writeInt(int offset,
int val)
DataBuffer
writeInt in interface DataBufferpublic int readInt(int offset)
DataBuffer
readInt in interface DataBuffer
public void writeLong(int offset,
long val)
DataBuffer
writeLong in interface DataBufferpublic long readLong(int offset)
DataBuffer
readLong in interface DataBuffer
public void writePointer(int offset,
long val)
DataBuffer
writePointer in interface DataBufferpublic long readPointer(int offset)
DataBuffer
readPointer in interface DataBuffer
public void writeCallbackReference(int offset,
long val)
DataBuffer
writeCallbackReference in interface DataBufferpublic long readCallbackReference(int offset)
DataBuffer
readCallbackReference in interface DataBuffer
public void writeByteArray(int offset,
byte[] val,
int srcOffset,
int length)
DataBuffer
writeByteArray in interface DataBufferoffset - target offset in this DataSourceval - where to get datasrcOffset - starting offset in the val arraylength - the number of bytes to copy
public void readByteArray(int offset,
byte[] dstArray,
int dstOffset,
int length)
DataBuffer
readByteArray in interface DataBufferoffset - source offset in this DataSourcedstArray - where to put datadstOffset - starting offset in the dstArray arraylength - the number of bytes to copy
public void writeByteArray(int offset,
byte[] val)
DataBuffer
writeByteArray in interface DataBuffer
public byte[] readByteArray(int offset,
int length)
DataBufferlength bytes from this source.
readByteArray in interface DataBuffer
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||