Posted by ¹é½Â¿ë on September 19, 1997 at 17:39:21:
appletÀ» appletviewer¿¡¼´Â File Read/Write°¡ °¡´ÉÇѵ¥
netscape»ó¿¡¼´Â ¾ÈµÇ´õ¶ó±¸¿ä!
Á¦ »ý°¢¿¡´Â °¡´ÉÇÒ°Í °°Àºµ¥ ¿ø·¡ ¾ÈµÇ´Â°ÍÀÎÁö ¾Æ´Ï¸é
´Ù¸¥ ¹æ¹ýÀ¸·Î ÇØ¾ß ÇÏ´ÂÁö ¾î¶»°Ô ÇØ¾ß µÉÁö ¸ð¸£°Ú½À´Ï´Ù.
Á¦°¡ Çß´ø ¼Ò½º¸¦ ¿Ã¸³´Ï´Ï´Ù.
FileDialog fd = new FileDialog(f, "File Saving...", FileDialog.SAVE);
fd.show();
String fname = fd.getDirectory() + fd.getFile();
String text = ta.getText();
byte b[] = new byte[text.length()];
text.getBytes(0, text.length(), b, 0);
FileOutputStream fo = null;
try {
fo = new FileOutputStream(fname);
fo.write(b);
fo.close();
} catch (IOException e1) {}
Read¿¡ ´ëÇØ¼µµ À§¿Í °°Àº ¹æ¹ýÀ¸·Î ÇÏ¿´½À´Ï´Ù.