📄 communication.java
字号:
import java.net.*;
import java.io.*;
class Communication
{
private ServerSocket ss;
private FileInputStream fileIn;
//...
public synchronized void cleanup() throws IOException
{
if (ss != null)
{
ss.close();
ss = null;
}
if (fileIn != null)
{
fileIn.close();
fileIn = null;
}
}
protected void finalize() throws Throwable
{
try {
cleanup();
}
finally {
super.finalize();
}
}
//...
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -