public static byte[] encode(String s) throws UTFDataFormatException {
    int utfCount = (int) countBytes(s, true);
    byte[] result = new byte[utfCount];
    encode(result, 0, s);
    return result;
  }
Returns an array containing the <i>modified UTF-8</i> form of {@code s}.
android/android_framework/dex-maker/src/main/java/com/android/dex/Mutf8.java