public class Utils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BUFFER_SIZE |
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
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) |
public static final int DEFAULT_BUFFER_SIZE
public static String read(InputStream in)
public static String readFromResource(String resource) throws IOException
IOException
public static byte[] readByteArrayFromResource(String resource) throws IOException
IOException
public static byte[] readByteArray(InputStream input) throws IOException
IOException
public static long copy(InputStream input, OutputStream output) throws IOException
IOException
public static String toString(StackTraceElement[] stackTrace)
public static Boolean getBoolean(Properties properties, String key)
public static Integer getInteger(Properties properties, String key)
public static Long getLong(Properties properties, String key)
public static final Date getStartTime()
public static long murmurhash2_64(String text)
public static long murmurhash2_64(byte[] data, int length, int seed)
public static byte[] md5Bytes(String text)
public static void putLong(byte[] b, int off, long val)
Copyright © 2013–2017 Alibaba Group. All rights reserved.