com.atlassian.confluence.util.io
Class IOUtils

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

public class IOUtils
extends java.lang.Object

General purpose java.io package utilities methods.


Constructor Summary
IOUtils()
           
 
Method Summary
static void close(java.io.InputStream i)
           
static void close(java.io.OutputStream o)
           
static void close(java.io.Reader r)
           
static void close(java.io.Writer w)
           
static void copy(java.io.InputStream i, java.io.OutputStream o)
          Copy the contents of the input stream to the output stream and then CLOSE both streams.
static java.io.File createTmpDir(java.lang.String prefix, java.lang.String suffix)
           
static void flushAndClose(java.io.OutputStream o)
           
static void flushAndClose(java.io.Writer w)
           
static byte[] readInputStream(java.io.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(java.io.InputStream i)

flushAndClose

public static void flushAndClose(java.io.OutputStream o)

close

public static void close(java.io.OutputStream o)

close

public static void close(java.io.Reader r)

close

public static void close(java.io.Writer w)

flushAndClose

public static void flushAndClose(java.io.Writer w)

copy

public static void copy(java.io.InputStream i,
                        java.io.OutputStream o)
                 throws java.io.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:
java.io.IOException

createTmpDir

public static java.io.File createTmpDir(java.lang.String prefix,
                                        java.lang.String suffix)
                                 throws java.io.IOException
Throws:
java.io.IOException

readInputStream

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


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.