±Û½ê¿ä...


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :À±Áö¼· 1998³â 1¿ù 22ÀÏ 15:35:40

In Reply to: ±×·±µ¥¿ä.... posted by candy on 1998³â 1¿ù 22ÀÏ 12:17:41:

Áú¹®ÇϽŠ³»¿ëÀ» Á¤È®È÷ ÀÌÇØ ÇÒ¼ö°¡ ¾ø½À´Ï´Ù.
´Ù½Ã Çѹø ÀÚ¼¼È÷ Áú¹®À» ¿Ã·ÁÁֽŴٸé Á¦°¡ ¾Ë°í ÀÖ´Â Çѵµ¿¡¼­
¼º½É²¯ µµ¿òÀ» µå¸®Áö¿ä.
´Ô²²¼­ ¿Ã¸®½Å ¼Ò½º¸¦ Á¦ ¸Ú´ë·Î Á¶±Ý ¼öÁ¤ÇØ ºÃ½À´Ï´Ù.
Âü°í Çϼ¼¿ä.


import java.io.*;
import java.awt.event.*;
public class DisplayFile extends Frame implements ActionListener,
WindowListener{
FileInputStream rf;
FileOutputStream wf;
File myFile;
TextArea ta;
public static void main(String args[]) {
DisplayFile Df = new DisplayFile(args[0]);
Df.addWindowListener(Df);
}
public DisplayFile(String temp) {
ta = new TextArea(20 , 50);
add(ta , "Center");
Button bok = new Button("SAVE");
bok.addActionListener(this);
add(bok , "North");
setSize(100,100);
setVisible(true);
init(temp);
}
public void init(String temp){
myFile = new File(temp);
byte b[] = new byte[(int) myFile.length()];
try {
rf = new FileInputStream(myFile);
for(int i =0; i < (int)myFile.length(); i++)
b[i] = (byte)rf.read();
rf.close();
} catch (IOException e) { }
ta.append(new String(b));
}
public void windowClosing (WindowEvent e4) {
setVisible(false);
dispose();
System.exit(0);
}
public void actionPerformed(ActionEvent e5) {
String imsi;
imsi = ta.getText();
byte b1[] = imsi.getBytes();
try {
wf = new FileOutputStream("ko.txt");
for(int i = 0; i < b1.length; i++){
if(b1[i] == '\n') wf.write((int)'\r');
wf.write(b1, i, 1);
}
wf.close();
}
catch (IOException ee) {
System.out.println("IO ERROR");
}
}
public void windowActivated(WindowEvent we1){}
public void windowClosed(WindowEvent we2){}
public void windowDeactivated(WindowEvent we3){}
public void windowDeiconified(WindowEvent we4){}
public void windowIconified(WindowEvent we5){}
public void windowOpened(WindowEvent we6){}
}



´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]