MCPcopy Index your code
hub / github.com/java-native-access/jna / read

Method read

src/com/sun/jna/StringArray.java:71–84  ·  view source on GitHub ↗

Read back from native memory.

()

Source from the content-addressed store, hash-verified

69 }
70 /** Read back from native memory. */
71 @Override
72 public void read() {
73 boolean returnWide = original instanceof WString[];
74 boolean wide = NativeString.WIDE_STRING.equals(encoding);
75 for (int si=0;si < original.length;si++) {
76 Pointer p = getPointer(si * Native.POINTER_SIZE);
77 Object s = null;
78 if (p != null) {
79 s = wide ? p.getWideString(0) : p.getString(0, encoding);
80 if (returnWide) s = new WString((String)s);
81 }
82 original[si] = s;
83 }
84 }
85
86 @Override
87 public String toString() {

Callers

nothing calls this directly

Calls 4

getWideStringMethod · 0.95
getStringMethod · 0.95
getPointerMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected