Indirect the native pointer to malloc space, a la Pointer.write . But this method performs a bounds checks to ensure that the indirection does not cause memory outside the malloc ed space to be accessed. @see Pointer#write(long,byte[],int,int)
(long bOff, byte[] buf, int index, int length)
| 354 | * @see Pointer#write(long,byte[],int,int) |
| 355 | */ |
| 356 | @Override |
| 357 | public void write(long bOff, byte[] buf, int index, int length) { |
| 358 | boundsCheck(bOff, length * 1L); |
| 359 | super.write(bOff, buf, index, length); |
| 360 | } |
| 361 | |
| 362 | /** |
| 363 | * Indirect the native pointer to <code>malloc</code> space, a la |