org.jboss.soa.esb.actions.soap.attachment
Class IOUtils

java.lang.Object
  extended by org.jboss.soa.esb.actions.soap.attachment.IOUtils

public final class IOUtils
extends java.lang.Object

IO utilites

Author:
Thomas.Diesler@jboss.org

Method Summary
static byte[] convertToBytes(javax.activation.DataHandler dh)
           
static void copyReader(java.io.OutputStream outs, java.io.Reader reader)
          Copy the reader to the output stream
static void copyStream(java.io.OutputStream outs, java.io.InputStream ins)
          Copy the input stream to the output stream
static java.io.File createTempDirectory()
           
static java.io.Writer getCharsetFileWriter(java.io.File file, java.lang.String charset)
           
static java.io.InputStream transformReader(java.io.Reader reader)
          Transform a Reader to an InputStream Background is that DocumentBuilder.parse() cannot take the Reader directly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCharsetFileWriter

public static java.io.Writer getCharsetFileWriter(java.io.File file,
                                                  java.lang.String charset)
                                           throws java.io.IOException
Throws:
java.io.IOException

copyStream

public static void copyStream(java.io.OutputStream outs,
                              java.io.InputStream ins)
                       throws java.io.IOException
Copy the input stream to the output stream

Throws:
java.io.IOException

copyReader

public static void copyReader(java.io.OutputStream outs,
                              java.io.Reader reader)
                       throws java.io.IOException
Copy the reader to the output stream

Throws:
java.io.IOException

convertToBytes

public static byte[] convertToBytes(javax.activation.DataHandler dh)

transformReader

public static java.io.InputStream transformReader(java.io.Reader reader)
                                           throws java.io.IOException
Transform a Reader to an InputStream Background is that DocumentBuilder.parse() cannot take the Reader directly

Throws:
java.io.IOException

createTempDirectory

public static java.io.File createTempDirectory()
                                        throws java.io.IOException
Throws:
java.io.IOException