Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 编程语言 > Java > SSH一次写入多个BLOB字段的数据
【标  题】:SSH一次写入多个BLOB字段的数据
【关键字】:SSH,BLOB
【来  源】:http://blog.csdn.net/huxb23/archive/2006/09/11/1208983.aspx

SSH一次写入多个BLOB字段的数据

Your Ad Here

 SSH一次写入多个BLOB字段的数据

public void saveReportreport(Reportreport rr, String rptpath,
   String htmlpath, String pdfpath) throws IOException,
   HibernateException, SQLException {
  // 处理半成品的REPORTREPORT
  this.getHibernateTemplate().save(rr);
  this.getHibernateTemplate().flush();
  this.getHibernateTemplate().refresh(rr, LockMode.UPGRADE);

  oracle.sql.BLOB blorpt = (oracle.sql.BLOB) rr.getHtmp();
  oracle.sql.BLOB blohtml = (oracle.sql.BLOB) rr.getHcontent();
  oracle.sql.BLOB blopdf = (oracle.sql.BLOB) rr.getPcontent();
  OutputStream out1 = blorpt.getBinaryOutputStream();
  FileInputStream fis1 = new FileInputStream(rptpath);
  byte[] buf1 = new byte[10240];
  int len1;
  while ((len1 = fis1.read(buf1)) > 0) {
   out1.write(buf1, 0, len1);

  }
  fis1.close();
  out1.close();
  OutputStream out2 = blohtml.getBinaryOutputStream();
  FileInputStream fis2 = new FileInputStream(htmlpath);
  byte[] buf2 = new byte[10240];
  int len2;
  while ((len2 = fis2.read(buf2)) > 0) {
   out2.write(buf2, 0, len2);

  }
  fis2.close();
  out2.close();
  OutputStream out3 = blopdf.getBinaryOutputStream();
  FileInputStream fis3 = new FileInputStream(pdfpath);
  byte[] buf3 = new byte[10240];
  int len3;
  while ((len3 = fis3.read(buf3)) > 0) {
   out3.write(buf3, 0, len3);

  }

  fis3.close();
  out3.close();
  this.getHibernateTemplate().save(rr);

 }

JMF写摄相头拍照程序:【上一篇】
swt大杂合:【下一篇】
【相关文章】
  • 一个阻挡ssh破解的解本
  • 安装MPICH和配置SSH
  • 2950 SSH、AutoQos、802.1x with VLAN等配置实例
  • Windows下安装Net::SSH::Perl
  • Linux下Telnet、ssh服务的配置和使用
  • Linux下MPICH2集群系统安装手册(采用建立信任ssh)
  • ssh 暴力攻击和系统日记
  • 使用java语言操作,如何来实现MySQL中Blob字段的存取
  • sshd 安全策略
  • 安装配置SSH(Secure Shell)
  • 【随机文章】
  • CAM350 NC 编辑器编辑菜单(Edit)
  • 显示和另存为图片
  • 移动数据:迁移到MPLS
  • 原始套节口操作函数示例 [转]
  • 關閉瀏覽器中自動輸入功能
  • 好的设计的重要性
  • 八婆
  • 无密码SSH到其他节点的配置
  • Heap error in Visual Studio 2005 Pro C++
  • java 学习2007年1月19。
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.