New Utils main classes + ImageUtils fixes
[nikiroo-utils.git] / src / be / nikiroo / utils / IOUtils.java
index 3e2f6e761481fbf7c0e741539c7f811dbf272daa..0d9bc378a83b856599eae7f2afaec30fa3711332 100644 (file)
@@ -213,7 +213,23 @@ public class IOUtils {
                        dir.mkdirs();
                }
 
-               FileWriter writerVersion = new FileWriter(new File(dir, filename));
+               writeSmallFile(new File(dir, filename), content);
+       }
+
+       /**
+        * Write the {@link String} content to {@link File}.
+        * 
+        * @param file
+        *            the {@link File} to write
+        * @param content
+        *            the content
+        * 
+        * @throws IOException
+        *             in case of I/O error
+        */
+       public static void writeSmallFile(File file, String content)
+                       throws IOException {
+               FileWriter writerVersion = new FileWriter(file);
                try {
                        writerVersion.write(content);
                } finally {