clone復(fù)制對(duì)象

          public  Object cloneObject(Object obj) throws Exception{
            ByteArrayOutputStream  byteOut = new ByteArrayOutputStream();
            ObjectOutputStream out = new ObjectOutputStream(byteOut);
            out.writeObject(obj);
            ByteArrayInputStream byteIn = new ByteArrayInputStream(byteOut.toByteArray());
            ObjectInputStream in =new ObjectInputStream(byteIn);
            return in.readObject();
            }
          淺克隆:List billBoxListClone = (List)BeanUtils.cloneBean(billBoxList);

          posted on 2013-03-31 22:42 youngturk 閱讀(236) 評(píng)論(0)  編輯  收藏 所屬分類: Java基礎(chǔ)

          <2013年3月>
          242526272812
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          導(dǎo)航

          統(tǒng)計(jì)

          公告

          this year :
          1 jQuery
          2 freemarker
          3 框架結(jié)構(gòu)
          4 口語(yǔ)英語(yǔ)

          常用鏈接

          留言簿(6)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          相冊(cè)

          EJB學(xué)習(xí)

          Flex學(xué)習(xí)

          learn English

          oracle

          spring MVC web service

          SQL

          Struts

          生活保健

          解析文件

          搜索

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 黎川县| 日照市| 吉安市| 定日县| 阿拉尔市| 泾川县| 宾川县| 宁晋县| 漳州市| 古田县| 都江堰市| 涞水县| 三明市| 新密市| 弥勒县| 渭南市| 绥德县| 成都市| 清新县| 永丰县| 大洼县| 延边| 渭源县| 南丹县| 漳浦县| 孟连| 即墨市| 柳林县| 拉孜县| 正镶白旗| 布拖县| 临城县| 衡山县| 云龙县| 台州市| 北流市| 夏河县| 尚义县| 九江市| 来安县| 常熟市|