2007/05/18 17:54 개발이야기
Java: 한줄씩 파일에 쓰기
PrintWriter outputStream = null;
try {
outputStream =
new PrintWriter(new FileWriter(filePath));
while(params.hasMoreElements())
{
outputStream.println(tmpStr);
}
} catch (FileNotFoundException fnot) {
fnot.printStackTrace();
} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
if (outputStream != null) {
outputStream.close();
}
}