public class TypeUtil extends Object
Constructor and Description |
---|
TypeUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
convertHexDigit(char c) |
static int |
convertHexDigit(int c) |
static int |
parseInt(String s,
int offset,
int length,
int base)
Parse an int from a substring.
|
static String |
toHexString(byte b) |
static String |
toHexString(byte[] b,
int offset,
int length) |
static String |
toString(byte[] bytes,
int base) |
public static int parseInt(String s, int offset, int length, int base) throws NumberFormatException
s
- Stringoffset
- Offset within stringlength
- Length of integer or -1 for remainder of stringbase
- base of the integerNumberFormatException
- if the string cannot be parsedpublic static String toString(byte[] bytes, int base)
public static int convertHexDigit(char c)
c
- An ASCII encoded character 0-9 a-f A-Fpublic static int convertHexDigit(int c)
c
- An ASCII encoded character 0-9 a-f A-Fpublic static String toHexString(byte b)
public static String toHexString(byte[] b, int offset, int length)
Copyright © 2018. All rights reserved.