public String getBankName() { return bankName !=null?bankName:""; }
public String getPhone() { return phone!=null?phone:""; }
public int getEmployeeNum() { return employeeNum; }
public byte[] serialize() throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(bos);
public Bank deserialize(byte[] data) throws IOException { ByteArrayInputStream bis = new ByteArrayInputStream(data); DataInputStream dis = new DataInputStream(bis);
Bank myBank = new Bank(); myBank.bankName = dis.readUTF(); myBank.phone = dis.readUTF(); myBank.employeeNum = dis.readInt();