@Name(value="long") public class CLongPointer extends Pointer
long.
All operations take into account the position and limit, when appropriate.
We need this class because platforms supported by Java do not all agree on the
size of the native C++ long type, unlike int and short.
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
CLongPointer() |
CLongPointer(int size)
Allocates a native
long array of the given size. |
CLongPointer(Pointer p) |
| Modifier and Type | Method and Description |
|---|---|
private void |
allocateArray(int size) |
CLongPointer |
capacity(int capacity)
Sets the capacity and returns this.
|
long |
get() |
long |
get(int i) |
CLongPointer |
limit(int limit)
Sets the limit and returns this.
|
CLongPointer |
position(int position)
Sets the position and returns this.
|
CLongPointer |
put(int i,
long l)
Copies the
long value to the i-th element of a native array. |
CLongPointer |
put(long l) |
address, asBuffer, asByteBuffer, capacity, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, hashCode, init, isNull, limit, memchr, memcmp, memcpy, memmove, memset, offsetof, position, put, setNull, sizeof, toString, withDeallocator, zeropublic CLongPointer(int size)
long array of the given size.size - the number of long elements to allocatepublic CLongPointer()
Pointer.Pointer()public CLongPointer(Pointer p)
Pointer.Pointer(Pointer)private void allocateArray(int size)
public CLongPointer position(int position)
Pointerarray.position(i)
statement sort of equivalent to the array[i] statement in C++.position in class Pointerposition - the new positionPointer.position(int)public CLongPointer limit(int limit)
Pointerlimit in class Pointerlimit - the new limitPointer.limit(int)public CLongPointer capacity(int capacity)
Pointercapacity in class Pointercapacity - the new capacityPointer.capacity(int)public long get()
get(0)public CLongPointer put(long l)
put(0, l)public CLongPointer put(int i, long l)
long value to the i-th element of a native array.i - the index into the arrayl - the long value to copyCopyright © 2015. All Rights Reserved.