MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / getBytes

Method getBytes

vm/JavaAPI/src/java/lang/String.java:296–303  ·  view source on GitHub ↗

Convert this String into bytes according to the platform's default character encoding, storing the result into a new byte array.

()

Source from the content-addressed store, hash-verified

294 * Convert this String into bytes according to the platform's default character encoding, storing the result into a new byte array.
295 */
296 public byte[] getBytes(){
297 try {
298 return getBytes("UTF-8");
299 } catch(java.io.UnsupportedEncodingException e) {
300 // dumbass checked exception
301 return null;
302 }
303 }
304
305 private static native byte[] charsToBytes(char[] arr, char[] encoding);
306

Callers 15

signMethod · 0.95
signingInputMethod · 0.95
signInNativeMethod · 0.95
generateMethod · 0.95
postResponseMethod · 0.95
decodeSharedScriptMethod · 0.95
applyDataReplacementsMethod · 0.95
applyDataReplacementsMethod · 0.95

Calls 4

charsToBytesMethod · 0.95
toCharNoCopyMethod · 0.95
toCharArrayMethod · 0.95
displayNameMethod · 0.45

Tested by 15

runTestMethod · 0.76
testFileClassMethod · 0.76
runTestMethod · 0.76
getJSONContentMethod · 0.76
mainMethod · 0.76
warmupMethod · 0.76
buildAsciiPayloadMethod · 0.76
buildMixedPayloadMethod · 0.76