목차
MainActivity.java
Main.xml
Main.xml
본문내용
.
.
.
.
.
@Override
public void onClick(View v) {
try {
FileOutputStream fos = openFileOutput(FILE_NAME,
Context.MODE_PRIVATE);
String str = edit1.getText().toString();
fos.write(str.getBytes());
fos.close();
} catch (Exception e) {
Log.e(\\\\"File\\\\", \\\\"에러=\\\\" + e);
}
.
.
.
.
btnRead.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
FileInputStream fis = openFileInput(FILE_NAME);
byte[] buffer = new byte[fis.available()];
fis.read(buffer);
String str = new String(buffer);
edit2.setText(str);
fis.close();
} catch (Exception e) {
Log.e(\\\\"File\\\\", \\\\"에러=\\\\" + e);
}
}
});
.
.
.
.
@Override
public void onClick(View v) {
try {
FileOutputStream fos = openFileOutput(FILE_NAME,
Context.MODE_PRIVATE);
String str = edit1.getText().toString();
fos.write(str.getBytes());
fos.close();
} catch (Exception e) {
Log.e(\\\\"File\\\\", \\\\"에러=\\\\" + e);
}
.
.
.
.
btnRead.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
FileInputStream fis = openFileInput(FILE_NAME);
byte[] buffer = new byte[fis.available()];
fis.read(buffer);
String str = new String(buffer);
edit2.setText(str);
fis.close();
} catch (Exception e) {
Log.e(\\\\"File\\\\", \\\\"에러=\\\\" + e);
}
}
});
소개글