阅读背景:

java List深度克隆

来源:互联网 

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;         
    }   public static List deepCopy(List src) throws IOEx




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: