public class Util
extends java.lang.Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
compress(java.io.Serializable object)
Compress a serializable object using gzip
|
static <T> T |
decompress(byte[] bytes)
Decompress a compressed object
|
static void |
describeException(java.lang.Exception e,
java.lang.String message)
Output information about an exception
|
static long |
getTime()
Return the current time
|
public static byte[] compress(java.io.Serializable object)
object
- object which implements Serializablepublic static <T> T decompress(byte[] bytes)
T
- the type of the object to decompress and deserializebytes
- byte array corresponding to compressed objectpublic static void describeException(java.lang.Exception e, java.lang.String message)
e
- The exceptionmessage
- Message to outputpublic static long getTime()