|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sasl.common.io.ResourceReader
public class ResourceReader
Helper class for resource reading operations.
| Constructor Summary | |
|---|---|
ResourceReader()
|
|
| Method Summary | |
|---|---|
String |
readStringResource(InputStream stream,
String charset)
Reads all bytes from the given input stream encoded by the given charset and returns the readed string. |
String |
readStringResource(String location)
Wrapper method for readStringResource(String, String) that uses
UTF-8 as the default character set. |
String |
readStringResource(String location,
String charset)
Reads the resource that has got the given character set encoding and is defined by the location into a string object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceReader()
| Method Detail |
|---|
public String readStringResource(String location)
throws IOException,
IllegalArgumentException
readStringResource(String, String) that uses
UTF-8 as the default character set.
location - non null
IOException - if any io exception occurs.
IllegalArgumentException - if location is null.readStringResource(String, String)
public String readStringResource(String location,
String charset)
throws IOException,
IllegalArgumentException
location - non nullcharset - non null
IOException - if any io exception occurs.
IllegalArgumentException - if location or charset is null.
public String readStringResource(InputStream stream,
String charset)
throws IOException,
IllegalArgumentException
stream - non nullcharset - non null
IOException - if any io exception occurs.
IllegalArgumentException - if stream or charset is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||