📄 dbrecord.java
字号:
package poker;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
import java.io.*;
class DbRecord {
static String serverName;
static String address;
static String ServerID;
static byte[] recordByte=new byte[60];
public static void set(String serverName,String address,String ServerID){
ByteArrayOutputStream baos=new ByteArrayOutputStream();
DataOutputStream dos=new DataOutputStream(baos);
OutputStream os;
OutputStreamWriter osw=new OutputStreamWriter(dos);
try{
osw.flush();
dos.writeUTF(serverName);
dos.writeUTF(address);
dos.writeUTF(ServerID);
dos.flush();
baos.flush();
recordByte=baos.toByteArray();
osw.close();
dos.close();
baos.close();
}catch (IOException e){
//
}
}
public static void get(byte[] b){
DataInputStream dis=new DataInputStream(new ByteArrayInputStream(b));
InputStreamReader isr=new InputStreamReader(dis);
try{
//ServiceConnection ss=new ServiceConnection(this,this.se);
serverName=dis.readUTF();
address=dis.readUTF();
ServerID=dis.readUTF();
isr.close();
dis.close();
}catch (IOException e){
//
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -