MCPcopy Index your code
hub / github.com/davidgiven/luje / getBytes

Method getBytes

lib/java/lang/String.java:823–829  ·  view source on GitHub ↗

Converts this string to a byte array using the default encoding as specified by the file.encoding system property. If the system property is not defined, the default encoding is ISO8859_1 (ISO-Latin-1). If 8859-1 is not available, an ASCII encoding is used. @return the byte array encoding of this s

()

Source from the content-addressed store, hash-verified

821 * @return the byte array encoding of this string.
822 */
823 public byte[] getBytes() {
824 ByteBuffer buffer = defaultCharset().encode(
825 CharBuffer.wrap(this.value, this.offset, this.count));
826 byte[] bytes = new byte[buffer.limit()];
827 buffer.get(bytes);
828 return bytes;
829 }
830
831 /**
832 * Converts this string to a byte array, ignoring the high order bits of

Callers 3

printMethod · 0.45
quoteIllegalMethod · 0.45
encodeOthersMethod · 0.45

Calls 6

defaultCharsetMethod · 0.95
wrapMethod · 0.95
getMethod · 0.95
getCharsetMethod · 0.95
limitMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected