org.gcube.smartgears.utils
Class Utils
java.lang.Object
org.gcube.smartgears.utils.Utils
public class Utils
- extends Object
Library-wide utils.
- Author:
- Fabio Simeoni
|
Constructor Summary |
Utils()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
isResource
public static boolean isResource(javax.servlet.ServletContext application)
unchecked
public static RuntimeException unchecked(Throwable t)
smartgearsVersion
public static String smartgearsVersion()
rethrowUnchecked
public static void rethrowUnchecked(Throwable t)
throws RuntimeException
- Throws:
RuntimeException
closeSafely
public static void closeSafely(Closeable c)
valid
public static void valid(String name,
Object[] o)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
notNull
public static void notNull(Object[] o)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
notNull
public static void notNull(String name,
Object o)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
notEmpty
public static void notEmpty(String name,
String o)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
notEmpty
public static void notEmpty(String name,
Object[] o)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
notEmpty
public static void notEmpty(String name,
Collection<?> o)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
valid
public static void valid(String name,
String o)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
home
public static String home()
handleError
public static void handleError(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Throwable t)
throws IOException
- Throws:
IOException
Copyright © 2013. All Rights Reserved.