Package com.atlassian.bamboo.utils
Class FileCopier
java.lang.Object
com.atlassian.bamboo.utils.FileCopier
This class provides common file copying code
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyStreams
(InputStream inputStream, OutputStream outputStream) Copies one stream to another.
-
Method Details
-
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
-