取消序列化列表
//package com.nowjava; /* from 时 代 J a v a */ import java.io.*; import java.util.ArrayList; import java.util.List; public class Main { public static <T> List<T> unserializList(String path) { File file = new File(path); List<T> collections = new ArrayList<T>(); ObjectInputStream objectInputStream = null; try { InputStream inputStream = new FileInputStream(file); objectInputStream = new ObjectInputStream(inputStream); while (true) { try { T t = (T) objectInputStream.readObject(); collections.add(t); } catch (EOFException e) { break;/*from 时 代 Java - nowjava.com*/ } } } catch (Exception e) { e.printStackTrace(); } finally {