안드로이드 개발 질문/답변
(글 수 45,052)
존재하는 파일을 열고서 파일 포인터를 파일 끝으로 보내고
데이터를 추가로 파일에 쓰려고 합니다.
C 로는 간단한 일인데 자바를 잘 모르니 쉽게 되지가 않는군요.
고수님들의 조언을 부탁합니다
2010.04.20 09:56:46
이걸 말씀하시는지 맞는가 모르겠네요..
String output_file = "test.txt";
FileOutputStream fos = openFileOutput(output_file, Context.MODE_APPEND);
파일 열때 모드에 따라서 알아서 되는걸루..^^;
String output_file = "test.txt";
FileOutputStream fos = openFileOutput(output_file, Context.MODE_APPEND);
파일 열때 모드에 따라서 알아서 되는걸루..^^;
2010.04.20 10:36:07
좋은 답변들 감사합니다.
File Object 을 생성할 때 처리하는 방법이 있군요.
FileOutputStream 을 사용을 하는데
FileOutputStream(String filename, boolean append) 을 사용을 해서
처리하면 될 것 같습니다.
2011.06.04 08:44:45
public FileOutputStream openFileOutput (String name, int mode)
The name of the file to open; can not contain path separators
경로명을 쓸수 없어서 일반적인 경우에는 쓸수 없는데요... 더 좋은 방법 없나요?



