81,092
社区成员
发帖
与我相关
我的任务
分享
java.sql.Blob content = eomWoAttachDto.getFileContent();
byte[] data = null;
long nLen = 0L;
nLen = content.length();
InputStream inStream = content.getBinaryStream();
ServletOutputStream sout = response.getOutputStream();
//txt输出的输出流
byte b[] = new byte[0x7a120];
for(int i = inStream.read(b); i != -1;)
{
sout.write(new String(b);
//将缓冲区的输入输出到页面
inStream.read(b);
}
sout.flush();
//输入完毕,清除缓冲
inStream.close();
sout.close();