userbean.java
来自「一个图书馆管理工具的原代码,希望大家指点」· Java 代码 · 共 67 行
JAVA
67 行
/* * UserBean.java * * Created on 2006年5月17日, 下午5:19 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */package cn.edu.uestc.pandawireless;import java.io.DataInputStream;import java.io.DataOutputStream;import java.io.IOException;/** * * @author 熊猫晓希 */public class UserBean { private String uid; private String pwd; /** Creates a new instance of UserBean */ public UserBean() { } public void setUID(String uid) { this.uid = uid; } public String getUID() { return uid; } public void setPWD(String pwd) { this.pwd = pwd; } public String getPWD() { return pwd; } public void serialize(DataOutputStream dos) { try{ dos.writeUTF(uid); dos.writeUTF(pwd); }catch(IOException ex){ } } public static UserBean deserialize(DataInputStream dis) { UserBean user = new UserBean(); try{ user.uid = dis.readUTF(); user.pwd = dis.readUTF(); }catch(IOException ex){ } return user; } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?