📄 mythread1.java
字号:
/* * mythread1.java * * Created on 2007年12月4日, 下午6:57 * * To change this template, choose Tools | Template Manager * and open the template in the editor. */package b;import java.net.*;import java.io.*;import javax.swing.JOptionPane;import java.awt.*;/** * * @author guowen */public class mythread1 extends Thread { public mythread1() { } public void run(){ try{ ServerSocket ss=new ServerSocket(6123); Socket s=ss.accept(); InputStream ips=s.getInputStream(); OutputStream ops=s.getOutputStream(); int num=ips.available(); byte[] buf=new byte[num]; int len=ips.read(buf); FileOutputStream fos=new FileOutputStream("RSA_ENCRYPT.txt"); fos.write(buf,0,len); JOptionPane.showMessageDialog(new Frame(),"注意查收文件!!"); fos.close(); ops.close(); ips.close(); }catch(Exception e){ System.out.println(e); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -