在Oracle中存取BLOB对象实现文件的上传和下载[8]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

File file = new File("d:\\output.txt");

   OutputStream fout = new FileOutputStream(file);

 

 

 

    //下面将BLOB数据写入文件

    byte[] b = new byte[1024];

    int len = 0;

        while ( (len = ins.read(b)) != -1) {

          fout.write(b, 0, len);

        }

  //依次关闭

  fout.close();

  ins.close();

  con.commit();

  con.close();

 

 

 

3.  JSP页面提交文件到数据库

 

 

 

本文关键:在Oracle中存取BLOB对象实现文件的上传和下载
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top