📄 sendmail.java
字号:
import java.io.*;
import java.net.*;
public class sendmail
{
static PrintStream ps=null; //发送信息
static DataInputStream dis=null; //接受信息
sendmail(PrintStream ptstream,DataInputStream distream)
{
this.ps =ptstream;
this.dis=distream;
}
public static void send(String str) throws IOException
{
ps.println(str); //发送串
ps.flush(); //刷新该串
}
public static void receive() throws IOException
{
String readstr=dis.readLine();
//System.out.println(readstr);
}
public static String getBASE64(String s){
if (s == null) return null;
return (new sun.misc.BASE64Encoder()).encode(s.getBytes());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -