Package com.atlassian.bamboo.utils
Class FileCopier
- java.lang.Object
-
- com.atlassian.bamboo.utils.FileCopier
-
public class FileCopier extends Object
This class provides common file copying code
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FileCopier.IoInputException
static class
FileCopier.IoOutputException
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
copyStreams(InputStream inputStream, OutputStream outputStream)
Copies one stream to another.
-
-
-
Method Detail
-
copyStreams
public static void copyStreams(InputStream inputStream, 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 useIOUtils.copy(InputStream, OutputStream)
. Note that IOUtils does not close the outputStream, this method does.- Parameters:
inputStream
- input stream to copy fromoutputStream
- output stream to copy to- Throws:
FileCopier.IoOutputException
- IOException thrown in case of output errorFileCopier.IoInputException
- IOException thrown in case of input error
-
-