DbAccount.java
上传用户:haojie1228
上传日期:2022-08-08
资源大小:347k
文件大小:1k
- 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 DbAccount {
- static String account;
- static String password;
- static byte[] recordByte=new byte[16];
- public static void set(String account,String password){
- ByteArrayOutputStream baos=new ByteArrayOutputStream();
- DataOutputStream dos=new DataOutputStream(baos);
- OutputStream os;
- OutputStreamWriter osw=new OutputStreamWriter(dos);
- try{
- osw.flush();
- dos.writeUTF(account);
- System.out.println("..."+account+password);
- dos.writeUTF(password);
- 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);
- account=dis.readUTF();
- password=dis.readUTF();
- isr.close();
- dis.close();
- }catch (IOException e){
- //
- }
- }
- }