重粒子的运行轨迹

Compiling ...
baryon.cpp
baryon.cpp(1) : warning C0000: all glory is fleeing

导航

读取数据库二进制流转为文件

	
//从结果集中获取二进制流转为blob
BLOB nFileBLOB = (BLOB) nResultSet.getBlob("FJ");
InputStream nInput = nFileBLOB.getBinaryStream();
//设置文件存储位置
String nFileUrl=StringTool.getRandomUUID();
FileOutputStream nOut = new FileOutputStream(new File("D:\\文件上传\\"+nFileUrl));
int len=0;
byte[] b=new byte[1024];
while((len = nInput.read(b))!=-1){
	nOut.write(b,0,len);
	nOut.close();
	nInput.close();

posted on 2017-10-16 21:38  重粒子  阅读(257)  评论(0编辑  收藏  举报