Реферат: Java технологія и основні риси та перспективи застосування
public void close() {
server.kill(this);
try {
sock.close(); // closes in and out too.
} catch (IOException e) {
}
}
public void write(String s) {
byte buf[] = new byte[s.length()];
s.getBytes(0, buf.length, buf, 0);
try {
out.write(buf, 0, buf.length);
} catch (IOException e) {
close();
}
}
private String readline() {
try {
return in.readLine();
} catch (IOException e) {
return null;
}
}
static private final int NAME = 1;
static private final int QUIT = 2;
static private final int TO = 3;
static private final int DELETE = 4;
static private Hashtable keys = new Hashtable();
static private String keystrings[] = {