com.atlassian.confluence.util.io
Class IOUtils

java.lang.Object
  extended by com.atlassian.confluence.util.io.IOUtils

public class IOUtils
extends Object

General purpose java.io package utilities methods.


Constructor Summary
IOUtils()
           
 
Method Summary
static void close(InputStream i)
           
static void close(OutputStream o)
           
static void close(Reader r)
           
static void close(Writer w)
           
static void copy(InputStream i, OutputStream o)
          Copy the contents of the input stream to the output stream and then CLOSE both streams.
static File createTmpDir(String prefix, String suffix)
           
static void flushAndClose(OutputStream o)
           
static void flushAndClose(Writer w)
           
static byte[] readInputStream(InputStream stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOUtils

public IOUtils()
Method Detail

close

public static void close(InputStream i)

flushAndClose

public static void flushAndClose(OutputStream o)

close

public static void close(OutputStream o)

close

public static void close(Reader r)

close

public static void close(Writer w)

flushAndClose

public static void flushAndClose(Writer w)

copy

public static void copy(InputStream i,
                        OutputStream o)
                 throws IOException
Copy the contents of the input stream to the output stream and then CLOSE both streams. Note: If you do not want the streams closed, call FileUtils.copy instead.

Parameters:
i -
o -
Throws:
IOException

createTmpDir

public static File createTmpDir(String prefix,
                                String suffix)
                         throws IOException
Throws:
IOException

readInputStream

public static byte[] readInputStream(InputStream stream)
                              throws IOException
Throws:
IOException


Confluence is developed by Atlassian.