数据的保存和读取 public static void sava(List list,String str){try {ObjectOutputStream out=new ObjectOutputStream(new FileOutputStream(str));out.writeObject(list);out.close();} catch (Exception e) {// TODO: handle exception}}public
public static void sava(List list,String str){ try { ObjectOutputStream out=new ObjectOutputStream(new FileOutputStream(str)); out.writeObject(list); out.close(); } catch (Exception e) { // TODO: handle exception } } public static Object load(Object obj,String str){ if(!new File(str).exists()){ Tools.pl("没有信息"); return null; } try { ObjectInputStream in=new ObjectInputStream(new FileInputStream(str)); obj= in.readObject(); in.close(); return obj; } catch (Exception e) { // TODO: handle exception return null; } }