code cleanup
[fanfix.git] / src / be / nikiroo / utils / IOUtils.java
index fa18d0de5c868f411d2d7da88e2cf39fd0e47f23..e7ab4033a8e15933ee6b38673a57efb6f074feb6 100644 (file)
@@ -232,7 +232,7 @@ public class IOUtils {
                        throws IOException {
                FileOutputStream out = new FileOutputStream(file);
                try {
-                       out.write(content.getBytes("UTF-8"));
+                       out.write(StringUtils.getBytes(content));
                } finally {
                        out.close();
                }
@@ -275,8 +275,7 @@ public class IOUtils {
                        write(stream, out);
                        return out.toString("UTF-8");
                } finally {
-                       // do NOT close, or the related stream will be closed, too
-                       // out.close();
+                       out.close();
                }
        }