От: | Foror | http://foror.ru | |
Дата: | 16.05.07 05:32 | ||
Оценка: |
void writeLines(File file, String[] lines, String encoding) throws IOException {
OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
try {
for (String line: lines) {
os.write(line.getBytes(encoding));
os.write('\n');
}
} finally {
os.close();
}
}