public final class RiceUtilities extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends Throwable> |
findExceptionInStack(Throwable topLevelException,
Class<T> exceptionClass)
This method searches for an exception of the specified type in the stack trace of the given
exception.
|
static String |
getFileSizeUnits(Long fileSize)
Converts a given file size in bytes to a unit of bytes, kilobyte,
megabyte, or gigabyte
|
static String |
getHostName() |
static String |
getIpNumber() |
static InputStream |
getResourceAsStream(String resourceLoc)
Attempts to retrieve the resource stream.
|
public static String getIpNumber()
public static String getHostName()
public static InputStream getResourceAsStream(String resourceLoc) throws MalformedURLException, IOException
resourceLoc - resource location; syntax supported by DefaultResourceLoaderMalformedURLExceptionIOExceptionDefaultResourceLoaderpublic static <T extends Throwable> T findExceptionInStack(Throwable topLevelException, Class<T> exceptionClass)
topLevelException - the exception whose stack to traverseexceptionClass - the exception class to look forpublic static String getFileSizeUnits(Long fileSize)
fileSize - - size in bytesCopyright © 2005–2015 The Kuali Foundation. All rights reserved.