|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.craftforge.commons.io.StreamUtils
public class StreamUtils
Stream Utils provide algorithms for standard stream operations.
| Constructor Summary | |
|---|---|
StreamUtils()
|
|
| Method Summary | |
|---|---|
static Object |
getObjectFromXmlOutputStream(Class<?> clazz,
ByteArrayOutputStream outputStream,
String charset)
Gets an object from an XML output stream using the given charset. |
static InputStream |
getXmlInputStreamFromObject(Object object,
String charset)
Gets an XML input stream from an object using the given charset. |
static String |
readStringFromInputStream(InputStream inputStream,
String charset)
Reads a string from an input stream using the given charset for decoding. |
static String |
readStringFromInputStreamReader(InputStreamReader inputStreamReader)
Reads a string from an input stream using the given input stream reader. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StreamUtils()
| Method Detail |
|---|
public static String readStringFromInputStream(InputStream inputStream,
String charset)
throws IOException
inputStream - The input streamcharset - The charset
IOException - if the input stream cannot be read
public static String readStringFromInputStreamReader(InputStreamReader inputStreamReader)
throws IOException
inputStreamReader - The input stream reader
IOException - if the input stream cannot be read
public static Object getObjectFromXmlOutputStream(Class<?> clazz,
ByteArrayOutputStream outputStream,
String charset)
clazz - The object's classoutputStream - The XML output streamcharset - The charset
public static InputStream getXmlInputStreamFromObject(Object object,
String charset)
object - The objectcharset - The charset
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||