public class Util extends Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
compress(Serializable object)
compress a serializable object using gzip
|
static <T> T |
decompress(byte[] bytes)
Decompress a compressed object
|
static void |
describeException(Exception e,
String message)
Output information about an exception
|
static long |
getTime()
Return the current time
|
static <T> T |
uncheckedCast(Object obj)
Perform an unchecked cast while suppressing warnings
|
public static <T> T uncheckedCast(Object obj)
T - type of cast objectobj - object to be cachedpublic static byte[] compress(Serializable object)
object - object which implements Serializablepublic static <T> T decompress(byte[] bytes)
T - type of decompressed objectbytes - byte array corresponding to compressed objectpublic static void describeException(Exception e, String message)
e - The exceptionmessage - Message to outputpublic static long getTime()
Copyright © 2015. All rights reserved.