Top Description Constructors Methods
org.droidparts.dexmaker.dx.util

public final Class Mutf8

extends Object
Class Inheritance
Imports
java.io.UTFDataFormatException

Modified UTF-8 as described in the dex file format spec.

Derived from libcore's MUTF-8 encoder at java.nio.charset.ModifiedUtf8.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static long
countBytes(String s, boolean shortLength)

Returns the number of bytes the modified UTF8 representation of 's' would take.

public static String
decode(ByteInput in, char[] out)

Decodes bytes from in into out until a delimiter 0x00 is encountered.

public static void
encode(byte[] dst, int offset, String s)

Encodes the modified UTF-8 bytes corresponding to s into dst, starting at offset.

public static byte[]
encode(String s)

Returns an array containing the modified UTF-8 form of s.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Mutf8back to summary
private Mutf8()

Method Detail

countBytesback to summary
private static long countBytes(String s, boolean shortLength) throws UTFDataFormatException

Returns the number of bytes the modified UTF8 representation of 's' would take.

decodeback to summary
public static String decode(ByteInput in, char[] out) throws UTFDataFormatException

Decodes bytes from in into out until a delimiter 0x00 is encountered. Returns a new string containing the decoded characters.

encodeback to summary
public static void encode(byte[] dst, int offset, String s)

Encodes the modified UTF-8 bytes corresponding to s into dst, starting at offset.

encodeback to summary
public static byte[] encode(String s) throws UTFDataFormatException

Returns an array containing the modified UTF-8 form of s.