A class to check buffer boundaries in general. If there is unsufficient space in the buffer when the call is made then a buffer overflow would otherwise occur and cause unexpected behaviour, a crash, or worse, a security risk. Internal class, don't use.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static void | |
| public static void | |
| public static int | Returns: the buffer position in bytesthe buffer to check buffer, final int the size to check size)Detects the buffer type and performs the corresponding check and also returns the buffer position in bytes. |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | checkBufferSize(Buffer
The buffer to check buf, int The minimum buffer size size)Helper method to ensure a buffer is big enough to receive data from a glGet* operation. |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| private static void | |
| private static void | |
| private static void | throwBufferSizeException(Buffer buf, int size)
This is a separate call to help inline checkBufferSize. |
| private static void |
| BufferChecks | back to summary |
|---|---|
| private BufferChecks() Static methods only! | |
| checkArray | back to summary |
|---|---|
| public static void checkArray(Object[] array) | |
| checkArray | back to summary |
|---|---|
| public static void checkArray(Object[] array, int size) | |
| checkArray | back to summary |
|---|---|
| public static void checkArray(long[] array, int size) | |
| checkBuffer | back to summary |
|---|---|
| public static int checkBuffer(final Buffer buffer, final int size) Detects the buffer type and performs the corresponding check and also returns the buffer position in bytes.
| |
| checkBuffer | back to summary |
|---|---|
| public static void checkBuffer(ByteBuffer buf, int size) | |
| checkBuffer | back to summary |
|---|---|
| public static void checkBuffer(ShortBuffer buf, int size) | |
| checkBuffer | back to summary |
|---|---|
| public static void checkBuffer(IntBuffer buf, int size) | |
| checkBuffer | back to summary |
|---|---|
| public static void checkBuffer(LongBuffer buf, int size) | |
| checkBuffer | back to summary |
|---|---|
| public static void checkBuffer(FloatBuffer buf, int size) | |
| checkBuffer | back to summary |
|---|---|
| public static void checkBuffer(DoubleBuffer buf, int size) | |
| checkBuffer | back to summary |
|---|---|
| public static void checkBuffer(PointerBuffer buf, int size) | |
| checkBufferSize | back to summary |
|---|---|
| public static void checkBufferSize(Buffer buf, int size) Helper method to ensure a buffer is big enough to receive data from a glGet* operation.
| |
| checkDirect | back to summary |
|---|---|
| public static void checkDirect(ByteBuffer buf) Helper methods to ensure a buffer is direct (and, implicitly, non-null). | |
| checkDirect | back to summary |
|---|---|
| public static void checkDirect(ShortBuffer buf) | |
| checkDirect | back to summary |
|---|---|
| public static void checkDirect(IntBuffer buf) | |
| checkDirect | back to summary |
|---|---|
| public static void checkDirect(LongBuffer buf) | |
| checkDirect | back to summary |
|---|---|
| public static void checkDirect(FloatBuffer buf) | |
| checkDirect | back to summary |
|---|---|
| public static void checkDirect(DoubleBuffer buf) | |
| checkDirect | back to summary |
|---|---|
| public static void checkDirect(PointerBuffer buf) | |
| checkFunctionAddress | back to summary |
|---|---|
| public static void checkFunctionAddress(long pointer) Helper methods to ensure a function pointer is not-null (0) | |
| checkNotNull | back to summary |
|---|---|
| public static void checkNotNull(Object o) | |
| checkNullTerminated | back to summary |
|---|---|
| public static void checkNullTerminated(ByteBuffer buf) Helper methods to ensure a ByteBuffer is null-terminated | |
| checkNullTerminated | back to summary |
|---|---|
| public static void checkNullTerminated(ByteBuffer buf, int count) | |
| checkNullTerminated | back to summary |
|---|---|
| public static void checkNullTerminated(IntBuffer buf) Helper method to ensure an IntBuffer is null-terminated | |
| checkNullTerminated | back to summary |
|---|---|
| public static void checkNullTerminated(LongBuffer buf) Helper method to ensure a LongBuffer is null-terminated | |
| checkNullTerminated | back to summary |
|---|---|
| public static void checkNullTerminated(PointerBuffer buf) Helper method to ensure a PointerBuffer is null-terminated | |
| throwArraySizeException | back to summary |
|---|---|
| private static void throwArraySizeException(Object[] array, int size) | |
| throwArraySizeException | back to summary |
|---|---|
| private static void throwArraySizeException(long[] array, int size) | |
| throwBufferSizeException | back to summary |
|---|---|
| private static void throwBufferSizeException(Buffer buf, int size) This is a separate call to help inline checkBufferSize. | |
| throwBufferSizeException | back to summary |
|---|---|
| private static void throwBufferSizeException(PointerBuffer buf, int size) | |