Permalink
Browse files

Add some TODOs

  • Loading branch information...
1 parent 14b16f9 commit a25bab40c719623efe0f15b681250b4e4b45640c @efsavage committed May 3, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 ajah-util/src/main/java/com/ajah/util/io/file/FileUtils.java
@@ -46,6 +46,7 @@
private static Logger log = Logger.getLogger(FileUtils.class.getName());
public static long copyFile(final File file, final File newFile) {
+ // TODO Write to temp file then rename
InputStream in = null;
OutputStream out = null;
long bytes = 0;
@@ -224,6 +225,7 @@ public static Long readFileAsLong(final File file, final Long defaultValue) {
* @throws IOException
*/
public static long write(final File file, final byte[] data) throws IOException {
+ // TODO Write to temp file then rename
AjahUtils.requireParam(data, "data");
BufferedOutputStream out = null;
try {
@@ -256,6 +258,7 @@ public static long write(final File file, final byte[] data) throws IOException
* @throws IOException
*/
public static long write(final File file, final InputStream in) throws IOException {
+ // TODO Write to temp file then rename
AjahUtils.requireParam(file, "file");
BufferedOutputStream out = null;
try {
@@ -278,6 +281,7 @@ public static long write(final File file, final InputStream in) throws IOExcepti
}
public static int write(final File file, final List<String> lines) throws IOException {
+ // TODO Write to temp file then rename
BufferedOutputStream out = null;
try {
file.getParentFile().mkdirs();
@@ -294,6 +298,7 @@ public static int write(final File file, final List<String> lines) throws IOExce
}
public static int write(final File file, final String string) throws IOException {
+ // TODO Write to temp file then rename
BufferedOutputStream out = null;
try {
file.getParentFile().mkdirs();

0 comments on commit a25bab4

Please sign in to comment.