Class HexParser

java.lang.Object
com.android.dx.util.HexParser

public final class HexParser extends Object
Utilities for parsing hexadecimal text.
  • Method Details

    • parse

      public static byte[] parse(String src)
      Parses the given text as hex, returning a byte[] corresponding to the text. The format is simple: Each line may start with a hex offset followed by a colon (which is verified and presumably used just as a comment), and then consists of hex digits freely interspersed with whitespace. If a pound sign is encountered, it and the rest of the line are ignored as a comment. If a double quote is encountered, then the ASCII value of the subsequent characters is used, until the next double quote. Quoted strings may not span multiple lines.
      Parameters:
      src - non-null; the source string
      Returns:
      non-null; the parsed form