下载数据库中存储的文件之二
2012-01-13 13:11
204 查看
smartUploadLoad 只用来下载己保存的文件,从数据库中取的可以这样:
bytes[] arr = resultSet.getBytes("xx");
response.setContentType("application/ms-download");
InputStream in = new InputStream(arr);
OutputStream output = response.getOutStream();
然后:
in.read(...)
output.write(...)
比如word文档为Response.ContentType="application/msword"
Response.BinaryWrite rs("file").getChunk(rs("file").ActualSize)
bytes[] arr = resultSet.getBytes("xx");
response.setContentType("application/ms-download");
InputStream in = new InputStream(arr);
OutputStream output = response.getOutStream();
然后:
in.read(...)
output.write(...)
比如word文档为Response.ContentType="application/msword"
Response.BinaryWrite rs("file").getChunk(rs("file").ActualSize)
相关文章推荐
- Android 多线程下载文件原理霸气解析介绍 (完结版)-----greendao数据库的存储,断点下载
- Oracle数据库对于大对象二进制文件的存储及下载
- springmvc和servlet在上传和下载文件(保持文件夹和存储数据库Blob两种方式)
- 简单方式下载网页中的文件存储在本地物理路径,或转成字节数组存入数据库中
- 下载数据库中存储的文件之一
- 将文件从数据库表中下载下来
- 【Android游戏开发十三】(保存游戏数据 [下文])详解SQLite存储方式,并把SQLite的数据库文件存储在SD卡中!!!
- PHP备份数据库生成SQL文件并下载的函数代码
- 保存pdf文件至数据库,在线预览并下载到本地
- 做个友善的系统配置页面、数据库连接串加密方式存储在配置文件的做法参考
- leveldb研究2- 存储分析,数据库日志文件格式,数据文件的格式和生成
- 世纪佳缘信息爬取存储到mysql,下载图片到本地,从数据库选取账号对其发送消息更新发信状态
- 用于显示ORACLE_BLOB存储的图片、flash文件的JSP文件,用于直接下载文件的JSP
- 详解SQLite存储方式,并把SQLite的数据库文件存储在SD卡中
- 文件上传表单 上传文件的细节 文件上传下载和数据库结合
- 如果程序集是从 Web 上下载的,即使它存储于本地计算机,Windows 也会将其标记为 Web 文件,http://go.microsoft.com/fwlink/?LinkId=179545
- 数据库存储与文件存储
- 上传文件到数据库,然后下载文件
- 使用hsql建立本地文件类型存储的数据库
- MongoDB入门(8)- c#通过操作MongoDB GridFS实现文件的数据库存储