public static List deepcopy(List src) throws IOException,
ClassNotFoundException {
ByteArrayOutputStream byteout = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(byteout);
out.writeObject(src);
ByteArrayInputStream bytein = new ByteArrayInputStream(byteout
.toByteArray());
ObjectInputStream in = new ObjectInputStream(bytein);
List dest = (List) in.readObject();
return dest;
}
ClassNotFoundException {
ByteArrayOutputStream byteout = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(byteout);
out.writeObject(src);
ByteArrayInputStream bytein = new ByteArrayInputStream(byteout
.toByteArray());
ObjectInputStream in = new ObjectInputStream(bytein);
List dest = (List) in.readObject();
return dest;
}