com.atlassian.bamboo.utils
Class FileCopier

java.lang.Object
  extended by com.atlassian.bamboo.utils.FileCopier

public class FileCopier
extends java.lang.Object

This class provides common file copying code


Nested Class Summary
static class FileCopier.IoInputException
           
static class FileCopier.IoOutputException
           
 
Method Summary
static void copyFile(java.io.File sourceFile, java.io.File destinationFile)
          Deprecated. since 3.1, use FileUtils.copyFile(File, File)
static void copyStreams(java.io.InputStream inputStream, java.io.OutputStream outputStream)
          Copies one stream to another.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

copyFile

@Deprecated
public static void copyFile(java.io.File sourceFile,
                                       java.io.File destinationFile)
Deprecated. since 3.1, use FileUtils.copyFile(File, File)

Parameters:
sourceFile -
destinationFile -

copyStreams

public static void copyStreams(java.io.InputStream inputStream,
                               java.io.OutputStream outputStream)
                        throws FileCopier.IoOutputException,
                               FileCopier.IoInputException
Copies one stream to another. In case you don't need to differentiate between read and write exceptions, always use IOUtils.copy(). Note that IOUtils does not close the outputStream, this method does.

Parameters:
inputStream - input stream to copy from
outputStream - output stream to copy to
Throws:
FileCopier.IoOutputException - IOException thrown in case of output error
FileCopier.IoInputException - IOException thrown in case of input error


Copyright © 2011 Atlassian. All Rights Reserved.