|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vgrs.xcode.common.Hex
public final class Hex
Base 16 or Hexadecimal is often represented using the digits 0-9 as well as the letters a-f. The decode methods in this class interpret this Hexadecimal notation, converting into usable data structures. The encode methods perform the opposite function, representing internal data using Hexadecimal notation.
| Constructor Summary | |
|---|---|
Hex()
|
|
| Method Summary | |
|---|---|
static byte[] |
decodeBytes(java.lang.String aInput)
Return the data structure represented by the Hexadecimal input sequence. |
static char[] |
decodeChars(java.lang.String aInput)
Return the data structure represented by the Hexadecimal input sequence. |
static int[] |
decodeInts(java.lang.String aInput)
Return the data structure represented by the Hexadecimal input sequence. |
static java.lang.String |
encode(byte[] aInput)
Return the Hexadecimal representation of the input sequence. |
static java.lang.String |
encode(char[] aInput)
Return the Hexadecimal representation of the input sequence. |
static java.lang.String |
encode(int[] aInput)
Return the Hexadecimal representation of the input sequence. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Hex()
| Method Detail |
|---|
public static java.lang.String encode(byte[] aInput)
throws XcodeException
aInput - Sequence of 8 bit bytes
XcodeException - if the input is null or with length == 0
public static java.lang.String encode(char[] aInput)
throws XcodeException
aInput - Sequence of 16 bit characters in UTF16 format
XcodeException - if the input is null or with length == 0
public static java.lang.String encode(int[] aInput)
throws XcodeException
aInput - Sequence of integers representing Unicode characters.
XcodeException - if the input is null or with length == 0
public static byte[] decodeBytes(java.lang.String aInput)
throws XcodeException
aInput - Grouped characters separated by a space. Each group represents a
single byte using hex notation.
XcodeException - if the input is null or with length == 0 or if length of the input
indicates the hex value is greater than 0xff
public static char[] decodeChars(java.lang.String aInput)
throws XcodeException
aInput - Grouped characters separated by a space. Each group represents a
single Utf16 character using hex notation.
XcodeException - if the input is null or with length == 0 or if length of the input
indicates the hex value is greater than 0xff
public static int[] decodeInts(java.lang.String aInput)
throws XcodeException
aInput - Grouped characters separated by a space. Each group represents a
single Unicode character using hex notation.
XcodeException - if the input is null or with length == 0 or if length of the input
indicates the hex value is greater than 0xffffffff
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||