|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.commons.Resources
public final class Resources
Helper methods for handling external resources.
Field Summary | |
---|---|
static java.nio.charset.Charset |
UTF8
UTF8 : Charset. |
Method Summary | |
---|---|
static java.io.InputStream |
open(java.lang.String resourcePath)
Open an input stream on a resource. |
static java.util.List<java.lang.String> |
readIntoList(java.lang.String resourcePath,
java.nio.charset.Charset charset)
Read a resource path into memory as a list of strings. |
static java.util.Properties |
readIntoProps(java.lang.String resourcePath)
Read a resource path into memory as properties. |
static java.lang.String |
readIntoString(java.io.InputStream is,
java.nio.charset.Charset charset)
Read an input stream into memory as a string. |
static java.lang.String |
readIntoString(java.net.URL url,
java.nio.charset.Charset charset)
Read a URL resource into memory as a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.nio.charset.Charset UTF8
Method Detail |
---|
public static java.lang.String readIntoString(java.net.URL url, java.nio.charset.Charset charset)
url
- The url to read from.charset
- The character set to use when reading the url.
public static java.lang.String readIntoString(java.io.InputStream is, java.nio.charset.Charset charset)
is
- The input stream to read from.charset
- The character set to use when reading the url.
public static java.util.Properties readIntoProps(java.lang.String resourcePath)
resourcePath
- The absolute, '/'-separated path to the resource.
public static java.util.List<java.lang.String> readIntoList(java.lang.String resourcePath, java.nio.charset.Charset charset)
One string per line in the resource.
resourcePath
- The absolute, '/'-separated path to the resource.charset
- The character set to use when reading the resource.
public static java.io.InputStream open(java.lang.String resourcePath)
resourcePath
- The absolute, '/'-separated path to the resource.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |