import org.apache.commons.io.IOUtils;
private void copy(File source, File target){
try {
in = new FileInputStream(source);
out = new FileOutputStream(target, true);
IOUtils.copy(in, out);
} catch (IOException ex) {
ex.printStackTrace();
} finally {
IOUtils.closeQuietly(in);
IOUtils.closeQuietly(out);
}
}
FileOutputStream의 생성자 중 두번째 인자는 append 여부.
'백엔드' 카테고리의 다른 글
| Maven - cannot find symbol symbol (0) | 2017.12.18 |
|---|---|
| SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". (0) | 2017.11.20 |
| EclipseLink 2.3 update URL (0) | 2011.09.09 |
| [펌] 프레임워크에 대한 불만을 정리한 글. (0) | 2011.09.02 |
| [펌] ivy vs maven 2 비교 자료 (0) | 2011.05.03 |