|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.util.TypeUtil
public class TypeUtil
TYPE Utilities. Provides various static utiltiy methods for manipulating types and their string representations.
| 字段摘要 | |
|---|---|
static int |
CR
|
static int |
LF
|
| 构造方法摘要 | |
|---|---|
TypeUtil()
|
|
| 方法摘要 | ||
|---|---|---|
static
|
asList(T[] a)
Array to List. |
|
static Object |
call(Class<?> oClass,
String method,
Object obj,
Object[] arg)
|
|
static byte |
convertHexDigit(byte c)
|
|
static int |
convertHexDigit(int c)
|
|
static void |
dump(Class<?> c)
|
|
static void |
dump(ClassLoader cl)
|
|
static byte[] |
fromHexString(String s)
|
|
static Class<?> |
fromName(String name)
Class from a canonical name for a type. |
|
static URL |
jarFor(String className)
|
|
static byte[] |
parseBytes(String s,
int base)
|
|
static int |
parseInt(byte[] b,
int offset,
int length,
int base)
Parse an int from a byte array of ascii characters. |
|
static int |
parseInt(String s,
int offset,
int length,
int base)
Parse an int from a substring. |
|
static byte[] |
readLine(InputStream in)
已过时。 |
|
static void |
toHex(byte b,
Appendable buf)
|
|
static void |
toHex(int value,
Appendable buf)
|
|
static void |
toHex(long value,
Appendable buf)
|
|
static String |
toHexString(byte b)
|
|
static String |
toHexString(byte[] b)
|
|
static String |
toHexString(byte[] b,
int offset,
int length)
|
|
static String |
toName(Class<?> type)
Canonical name for a type. |
|
static String |
toString(byte[] bytes,
int base)
|
|
static Object |
valueOf(Class<?> type,
String value)
Convert String value to instance. |
|
static Object |
valueOf(String type,
String value)
Convert String value to instance. |
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public static int CR
public static int LF
| 构造方法详细信息 |
|---|
public TypeUtil()
| 方法详细信息 |
|---|
public static <T> List<T> asList(T[] a)
Works like Arrays.asList(Object...), but handles null arrays.
public static Class<?> fromName(String name)
name - A class or type name.
public static String toName(Class<?> type)
type - A class , which may be a primitive TYPE field.
public static Object valueOf(Class<?> type,
String value)
type - The class of the instance, which may be a primitive TYPE field.value - The value as a string.
public static Object valueOf(String type,
String value)
type - classname or type (eg int)value - The value as a string.
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 integer
NumberFormatException - if the string cannot be parsed
public static int parseInt(byte[] b,
int offset,
int length,
int base)
throws NumberFormatException
b - byte arrayoffset - Offset within stringlength - Length of integer or -1 for remainder of stringbase - base of the integer
NumberFormatException - if the array cannot be parsed into an integer
public static byte[] parseBytes(String s,
int base)
public static String toString(byte[] bytes,
int base)
public static byte convertHexDigit(byte c)
c - An ASCII encoded character 0-9 a-f A-F
public static int convertHexDigit(int c)
c - An ASCII encoded character 0-9 a-f A-F
public static void toHex(byte b,
Appendable buf)
public static void toHex(int value,
Appendable buf)
throws IOException
IOException
public static void toHex(long value,
Appendable buf)
throws IOException
IOExceptionpublic static String toHexString(byte b)
public static String toHexString(byte[] b)
public static String toHexString(byte[] b,
int offset,
int length)
public static byte[] fromHexString(String s)
public static void dump(Class<?> c)
public static void dump(ClassLoader cl)
public static byte[] readLine(InputStream in)
throws IOException
IOExceptionpublic static URL jarFor(String className)
public static Object call(Class<?> oClass,
String method,
Object obj,
Object[] arg)
throws InvocationTargetException,
NoSuchMethodException
InvocationTargetException
NoSuchMethodException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||