public class InputOutputStreamUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
InputOutputStreamUtil.Response |
Constructor and Description |
---|
InputOutputStreamUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
copyBytesFromInputToOutputStream(OutputStream oStream,
InputStream iStream)
Deprecated.
use Apache Commons,
IOUtils.copy(InputStream, OutputStream) instead |
static Object |
parseYamlConfig(Class<?> c)
If class is "X.java" then parse the "X.yaml"
|
static String |
prettyPrintXml(Element xml) |
static void |
prettyPrintXml(Writer writer,
Element xml) |
static byte[] |
readBytesFromInputStream(InputStream iStream)
Deprecated.
use Apache Commons,
IOUtils.toByteArray(InputStream) instead |
static InputOutputStreamUtil.Response |
readBytesFromUrl(URL url) |
static String |
readStringFromReader(Reader iStream)
Deprecated.
use Apache Commons,
IOUtils.toString(Reader) instead |
static String |
readUtf8(File file)
Deprecated.
use
FileUtils.readFileToString(File, String) with UTF-8 encoding instead |
static void |
writeBytesToOutputStream(OutputStream out,
byte[] src) |
static void |
writeStringToFileUtf8(File f,
String str)
Deprecated.
use Apache Commons,
FileUtils.writeStringToFile(File, String, String) instead |
static void |
writeXmlToFile(File out,
Element xml) |
public static void copyBytesFromInputToOutputStream(OutputStream oStream, InputStream iStream) throws IOException
IOUtils.copy(InputStream, OutputStream)
insteadIOException
public static byte[] readBytesFromInputStream(InputStream iStream) throws IOException
IOUtils.toByteArray(InputStream)
insteadIOException
public static String readStringFromReader(Reader iStream) throws IOException
IOUtils.toString(Reader)
insteadIOException
public static InputOutputStreamUtil.Response readBytesFromUrl(URL url)
public static void writeStringToFileUtf8(File f, String str) throws IOException
FileUtils.writeStringToFile(File, String, String)
insteadIOException
public static void writeBytesToOutputStream(OutputStream out, byte[] src) throws IOException
IOException
public static String readUtf8(File file)
FileUtils.readFileToString(File, String)
with UTF-8 encoding insteadpublic static Object parseYamlConfig(Class<?> c)