throws IOException {
FileOutputStream out = new FileOutputStream(file);
try {
- out.write(content.getBytes("UTF-8"));
+ out.write(StringUtils.getBytes(content));
} finally {
out.close();
}
write(stream, out);
return out.toString("UTF-8");
} finally {
- // do NOT close, or the related stream will be closed, too
- // out.close();
+ out.close();
}
}