posts - 35,  comments - 6,  trackbacks - 0
java一:
voTShizhengRoadPursue.setAuditingAdvice(Hibernate.createBlob(new byte[1]));
先插入一个obj
java二:
  FormFile file = inDto.getCivicimProjectDTO().getUpload();
           session.flush();
   session.refresh(voTShizhengRoadPursue, LockMode.UPGRADE);
   BLOB blob = (oracle.sql.BLOB) voTShizhengRoadPursue.getAuditingAdvice();
   OutputStream out = blob.getBinaryOutputStream();
   InputStream fileContent = file.getInputStream();
   byte[] buf = new byte[1024];
   int len;
   while ((len = fileContent.read(buf)) > 0) {
    out.write(buf, 0, len);
   }
   fileContent.close();
   out.close();
   }

posted on 2007-04-18 14:56 NG 阅读(1449) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 
<2007年4月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

常用链接

留言簿(1)

随笔档案(35)

文章分类(5)

文章档案(2)

新闻档案(5)

java link

搜索

  •  

最新评论

阅读排行榜

评论排行榜