您的位置:首页 > 数据库

下载数据库中存储的文件之二

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)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐