Package com.alibaba.druid.util
Class Utils
java.lang.Object
com.alibaba.druid.util.Utils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longcopy(InputStream input, OutputStream output) static booleanstatic longfnv_32_lower(String key) static longstatic longfnv_64_lower(String key) static BooleangetBoolean(Properties properties, String key) static IntegergetInteger(Properties properties, String key) static LonggetLong(Properties properties, String key) static Stringstatic final Datestatic Stringhex(int hash) static Stringhex(long hash) static Stringhex_t(long hash) static Class<?>static voidloadFromFile(String path, Set<String> set) static Stringstatic byte[]static longmurmurhash2_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 longmurmurhash2_64(String text) static voidputLong(byte[] b, int off, long val) static Stringread(InputStream in) static Stringstatic Stringstatic byte[]readByteArray(InputStream input) static byte[]readByteArrayFromResource(String resource) static StringreadFromResource(String resource) static StringtoString(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
-