|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.oreodata.util.Util
Dumping ground for utility functions that are more or less general-purpose.
Field Summary | |
static java.util.Enumeration |
EMPTY_ENUM
An empty java.util.Enumeration, comes in handy for API's that require an Enumeration to be passed in or out. |
static java.util.Iterator |
EMPTY_ITERATOR
An empty java.util.Iterator, comes in handy for API's that require an Iterator to be passed in or out. |
static java.lang.Integer |
ZERO
A zero integer wrapper, defined statically here to avoid replications |
Constructor Summary | |
Util()
|
Method Summary | |
static java.util.Enumeration |
arrayAsEnumeration(java.lang.Object[] arr)
wraps an array of objects as an instance of java.util.Enumeration useful for API's that require an Enumeration to be passed in or out. |
static java.lang.String |
convertHTMLEntities(java.lang.String s)
Converts the literal characters in a string to HTML entities as need be. |
org.xml.sax.InputSource |
createEmptyInputSource(java.lang.String systemId)
|
static java.lang.Class |
findClass(java.lang.String className,
java.lang.ClassLoader loader)
|
static java.lang.String |
fromByteEncodedString(java.lang.String s)
|
static java.io.InputStream |
getInputStream(java.lang.String location)
Gets the specified input stream, assuming that it may be a fully specified filename, OR relative to the system classpath. |
static java.io.InputStream |
getInputStream(java.lang.String location,
java.lang.ClassLoader cl)
|
static java.lang.Throwable |
getNested(java.lang.Throwable t)
|
static void |
gunzipFile(java.io.File file)
|
static void |
gzipFile(java.io.File file)
|
static boolean |
hasContent(java.lang.String s)
|
static boolean |
hasNonAscii(java.lang.String s)
A routine that says whether the given string has unicode characters in it -- by that I mean, characters above 0x7F, for which a naive byte encoding will not work. |
static boolean |
isAffirmative(java.lang.String s)
|
static boolean |
isNegative(java.lang.String s)
|
static java.lang.String |
noNull(java.lang.String s)
|
static java.util.Iterator |
objectAsIterator(java.lang.Object o)
take a single object and wrap it up as an instance of java.util.Iterator useful for API's that require an Iterator to be passed in or out. |
static void |
printFullStackTrace(java.lang.Throwable t,
java.io.PrintStream stream)
|
static java.lang.String |
randomAlphaNumString(int length)
generate a random alphanum string of the given length. |
static java.lang.String |
toByteEncodedString(java.lang.String s)
|
static java.lang.String |
toDoubleQuoteLiteral(java.lang.String s)
A convenience routine that switches a string with possibly embedded \' to '' for escaping the single quote character. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.util.Enumeration EMPTY_ENUM
public static final java.util.Iterator EMPTY_ITERATOR
public static final java.lang.Integer ZERO
Constructor Detail |
public Util()
Method Detail |
public static java.lang.String noNull(java.lang.String s)
public static boolean hasContent(java.lang.String s)
public static java.io.InputStream getInputStream(java.lang.String location)
public static java.io.InputStream getInputStream(java.lang.String location, java.lang.ClassLoader cl)
public static java.lang.Class findClass(java.lang.String className, java.lang.ClassLoader loader) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static java.util.Enumeration arrayAsEnumeration(java.lang.Object[] arr)
public static java.util.Iterator objectAsIterator(java.lang.Object o)
public static void printFullStackTrace(java.lang.Throwable t, java.io.PrintStream stream)
public static java.lang.Throwable getNested(java.lang.Throwable t)
public static java.lang.String convertHTMLEntities(java.lang.String s)
public static boolean hasNonAscii(java.lang.String s)
public static java.lang.String toByteEncodedString(java.lang.String s)
public static java.lang.String fromByteEncodedString(java.lang.String s)
public static java.lang.String randomAlphaNumString(int length)
public static java.lang.String toDoubleQuoteLiteral(java.lang.String s)
public static void gzipFile(java.io.File file) throws java.io.IOException
java.io.IOException
public static void gunzipFile(java.io.File file) throws java.io.IOException
java.io.IOException
public org.xml.sax.InputSource createEmptyInputSource(java.lang.String systemId)
public static boolean isNegative(java.lang.String s)
public static boolean isAffirmative(java.lang.String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |