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
IOExceptionpublic static void copyStream(OutputStream outs, InputStream ins) throws IOException
IOExceptionpublic static void copyReader(OutputStream outs, Reader reader) throws IOException
IOExceptionpublic static byte[] convertToBytes(DataHandler dh)
public static InputStream transformReader(Reader reader) throws IOException
IOExceptionpublic static File createTempDirectory() throws IOException
IOExceptionCopyright © 2012 JBoss, by Red Hat. All Rights Reserved.