MCPcopy Create free account
hub / github.com/java-native-access/jna / setPointer

Method setPointer

src/com/sun/jna/Memory.java:722–726  ·  view source on GitHub ↗

Indirect the native pointer to malloc space, a la Pointer.setPointer . 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#setPointer

(long offset, Pointer value)

Source from the content-addressed store, hash-verified

720 * @see Pointer#setPointer
721 */
722 @Override
723 public void setPointer(long offset, Pointer value) {
724 boundsCheck(offset, Native.POINTER_SIZE);
725 super.setPointer(offset, value);
726 }
727
728 @Override
729 public void setString(long offset, String value, String encoding) {

Callers 15

testCFArrayMethod · 0.95
setRgpMsgCertMethod · 0.95
setRgpMsgCrlMethod · 0.95
testGetNativeMappedMethod · 0.95
testGetStringArrayMethod · 0.95
testReadPointerArrayMethod · 0.95
testGetSharedMemoryMethod · 0.95
TestStructureClass · 0.45
testNativeMappedReadMethod · 0.45
StringArrayMethod · 0.45

Calls 1

boundsCheckMethod · 0.95

Tested by 8

testCFArrayMethod · 0.76
testGetNativeMappedMethod · 0.76
testGetStringArrayMethod · 0.76
testReadPointerArrayMethod · 0.76
testGetSharedMemoryMethod · 0.76
testNativeMappedReadMethod · 0.36