public final class IOUtils extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
convertToBytes(DataHandler dh) |
static void |
copyReader(OutputStream outs,
Reader reader)
Copy the reader to the output stream
|
static void |
copyStream(OutputStream outs,
InputStream ins)
Copy the input stream to the output stream
|
static File |
createTempDirectory() |
static Writer |
getCharsetFileWriter(File file,
String charset) |
static InputStream |
transformReader(Reader reader)
Transform a Reader to an InputStream
Background is that DocumentBuilder.parse() cannot take the Reader directly
|
public static Writer getCharsetFileWriter(File file, String charset) throws IOException
IOException
public static void copyStream(OutputStream outs, InputStream ins) throws IOException
IOException
public static void copyReader(OutputStream outs, Reader reader) throws IOException
IOException
public static byte[] convertToBytes(DataHandler dh)
public static InputStream transformReader(Reader reader) throws IOException
IOException
public static File createTempDirectory() throws IOException
IOException
Copyright © 2012 JBoss, by Red Hat. All Rights Reserved.