Package com.alibaba.druid.util
Class Utils
java.lang.Object
com.alibaba.druid.util.Utils
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
copy
(InputStream input, OutputStream output) static boolean
static long
fnv_32_lower
(String key) static long
static long
fnv_64_lower
(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
static final Date
static String
hex
(int hash) static String
hex
(long hash) static String
hex_t
(long hash) static Class<?>
static void
loadFromFile
(String path, Set<String> set) static String
static byte[]
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
static String
static byte[]
readByteArray
(InputStream input) static byte[]
readByteArrayFromResource
(String resource) static String
readFromResource
(String resource) static String
toString
(StackTraceElement[] stackTrace) static String
-
Field Details
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE- See Also:
-
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
read
-
readFromResource
- Throws:
IOException
-
readByteArrayFromResource
- Throws:
IOException
-
readByteArray
- Throws:
IOException
-
copy
- Throws:
IOException
-
read
-
read
-
toString
-
getStackTrace
-
toString
-
getBoolean
-
getInteger
-
getLong
-
loadClass
-
getStartTime
-
murmurhash2_64
-
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
-
md5
-
putLong
public static void putLong(byte[] b, int off, long val) -
equals
-
hex
-
hex
-
hex_t
-
fnv_64
-
fnv_64_lower
-
fnv_32_lower
-
loadFromFile
-