将流存进Buffer里
byte[] buffer = null;
int a = doc.getDocumentSize()*1024;
buffer = new byte[a];
int byteread=0;
FileOutputStream fos=new FileOutputStream(buffer.toString());
BufferedOutputStream bos=new BufferedOutputStream(fos);
bos.flush();
bos.close();
然后 将Buffer里的数据存到本地
bos.toString();
FileOutputStream fs=new FileOutputStream("c:/aaa"+"."+doc.getDefaultExtension());
byteread=inStream.read(buffer);
fs.write(buffer,0,byteread);
inStream.close();或是存到相对路径
FileOutputStream fis = new FileOutputStream(filePath1);
posted on 2006-07-31 12:12
Crespo 阅读(373)
评论(0) 编辑 收藏 所属分类:
Java web