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

public final Class HexParser

extends Object
Class Inheritance

Utilities for parsing hexadecimal text.

Constructor Summary

AccessConstructor and Description
private
HexParser()

This class is uninstantiable.

Method Summary

Modifier and TypeMethod and Description
public static byte[]

Returns:

non-null; the parsed form
parse
(String
non-null; the source string
src
)

Parses the given text as hex, returning a byte[] corresponding to the text.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HexParserback to summary
private HexParser()

This class is uninstantiable.

Method Detail

parseback to summary
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:String

non-null; the source string

Returns:byte[]

non-null; the parsed form