@Name(value="size_t") public class SizeTPointer extends Pointer
size_t.
All operations take into account the position and limit, when appropriate.
We need this class because the size differs between 32-bit and 64-bit platforms.
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.DeallocatorReference, Pointer.DeallocatorThread, Pointer.NativeDeallocatoraddress, capacity, deallocatorThread, limit, maxBytes, maxPhysicalBytes, maxRetries, position| Constructor and Description |
|---|
SizeTPointer() |
SizeTPointer(long size)
Allocates a native
size_t array of the given size. |
SizeTPointer(Pointer p) |
| Modifier and Type | Method and Description |
|---|---|
private void |
allocateArray(long size) |
SizeTPointer |
capacity(long capacity)
Sets the capacity and returns this.
|
long |
get() |
long |
get(long i) |
SizeTPointer |
limit(long limit)
Sets the limit and returns this.
|
SizeTPointer |
position(long position)
Sets the position and returns this.
|
SizeTPointer |
put(long s) |
SizeTPointer |
put(long i,
long s)
Copies the
size_t value to the i-th element of a native array. |
address, asBuffer, asByteBuffer, calloc, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, init, isNull, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, withDeallocator, zeropublic SizeTPointer(long size)
size_t array of the given size.size - the number of size_t elements to allocatepublic SizeTPointer()
Pointer.Pointer()public SizeTPointer(Pointer p)
Pointer.Pointer(Pointer)private void allocateArray(long size)
public SizeTPointer position(long position)
Pointerarray.position(i)
statement sort of equivalent to the array[i] statement in C++.position in class Pointerposition - the new positionPointer.position(long)public SizeTPointer limit(long limit)
Pointerlimit in class Pointerlimit - the new limitPointer.limit(long)public SizeTPointer capacity(long capacity)
Pointercapacity in class Pointercapacity - the new capacityPointer.capacity(long)public long get()
get(0)public SizeTPointer put(long s)
put(0, s)public SizeTPointer put(long i, long s)
size_t value to the i-th element of a native array.i - the index into the arrays - the size_t value to copyCopyright © 2016. All rights reserved.