com.alibaba.druid.util
类 Utils
java.lang.Object
com.alibaba.druid.util.Utils
public class Utils
- extends Object
|
方法摘要 |
static long |
copy(InputStream input,
OutputStream output)
|
static Boolean |
getBoolean(javax.servlet.GenericServlet servlet,
String key)
|
static Boolean |
getBoolean(Properties properties,
String key)
|
static Integer |
getInteger(Properties properties,
String key)
|
static Long |
getLong(Properties properties,
String key)
|
static String |
getStackTrace(Throwable ex)
|
static Date |
getStartTime()
|
static Class<?> |
loadClass(String className)
|
static String |
md5(String text)
|
static byte[] |
md5Bytes(String text)
|
static long |
murmurhash2_64(byte[] data,
int length,
int seed)
murmur hash 2.0, The murmur hash is a relatively fast hash function from http://murmurhash.googlepages.com/ for
platforms with efficient multiplication. |
static long |
murmurhash2_64(String text)
|
static void |
putLong(byte[] b,
int off,
long val)
|
static String |
read(InputStream in)
|
static String |
read(Reader reader)
|
static String |
read(Reader reader,
int length)
|
static byte[] |
readByteArray(InputStream input)
|
static byte[] |
readByteArrayFromResource(String resource)
|
static String |
readFromResource(String resource)
|
static String |
toString(Date date)
|
static String |
toString(StackTraceElement[] stackTrace)
|
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE
- 另请参见:
- 常量字段值
Utils
public Utils()
read
public static String read(InputStream in)
readFromResource
public static String readFromResource(String resource)
throws IOException
- 抛出:
IOException
readByteArrayFromResource
public static byte[] readByteArrayFromResource(String resource)
throws IOException
- 抛出:
IOException
readByteArray
public static byte[] readByteArray(InputStream input)
throws IOException
- 抛出:
IOException
copy
public static long copy(InputStream input,
OutputStream output)
throws IOException
- 抛出:
IOException
read
public static String read(Reader reader)
read
public static String read(Reader reader,
int length)
toString
public static String toString(Date date)
getStackTrace
public static String getStackTrace(Throwable ex)
toString
public static String toString(StackTraceElement[] stackTrace)
getBoolean
public static Boolean getBoolean(Properties properties,
String key)
getBoolean
public static Boolean getBoolean(javax.servlet.GenericServlet servlet,
String key)
getInteger
public static Integer getInteger(Properties properties,
String key)
getLong
public static Long getLong(Properties properties,
String key)
loadClass
public static Class<?> loadClass(String className)
getStartTime
public static final Date getStartTime()
murmurhash2_64
public static long murmurhash2_64(String text)
murmurhash2_64
public static long murmurhash2_64(byte[] data,
int length,
int seed)
- murmur hash 2.0, The murmur hash is a relatively fast hash function from http://murmurhash.googlepages.com/ for
platforms with efficient multiplication.
md5Bytes
public static byte[] md5Bytes(String text)
md5
public static String md5(String text)
putLong
public static void putLong(byte[] b,
int off,
long val)
Copyright © 2013 Alibaba Group. All Rights Reserved.