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

Method read

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

Indirect the native pointer to malloc space, a la Pointer.read . 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#read(long,byte[],int,int)

(long bOff, byte[] buf, int index, int length)

Source from the content-addressed store, hash-verified

238 * @see Pointer#read(long,byte[],int,int)
239 */
240 @Override
241 public void read(long bOff, byte[] buf, int index, int length) {
242 boundsCheck(bOff, length * 1L);
243 super.read(bOff, buf, index, length);
244 }
245
246 /**
247 * Indirect the native pointer to <code>malloc</code> space, a la

Callers 3

getWindowIconMethod · 0.95
testReadPointerArrayMethod · 0.95
testGetSharedMemoryMethod · 0.95

Calls 2

boundsCheckMethod · 0.95
readMethod · 0.65

Tested by 2

testReadPointerArrayMethod · 0.76
testGetSharedMemoryMethod · 0.76