|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.util.ResourceStreamUtil
public class ResourceStreamUtil
A convenience class for accessing resources.
Copyright Enough Software 2008
| Method Summary | |
|---|---|
static byte[] |
getResourceAsByteArray(java.lang.String url)
Retrieves a resource as a byte array. |
static byte[] |
toByteArray(java.io.InputStream in)
Retrieves a resource as a byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static byte[] getResourceAsByteArray(java.lang.String url)
throws java.io.IOException
url - the URL of the resource within the JAR file, e.g. /resource.xml
java.io.IOException - when the resource could not be read
public static byte[] toByteArray(java.io.InputStream in)
throws java.io.IOException
in - the input stream of the resource, the input stream will be closed automatically
java.io.IOException - when the resource could not be read
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||