DocAttachment attch = (DocAttachment) RecordSet.get(i);
try {
// 附件路径
String destFile = rootFile + File.separator
+ attch.getName();
// 检查目标文件是否存在
FileOperator.newFolderAndFile(rootFile, attch.getName());
oracle.sql.BLOB blobo = (oracle.sql.BLOB) attch
.getFileData();
InputStream fin = ((oracle.sql.BLOB) blobo)
.getBinaryStream();
FileOperator.outBinaryFile(fin, destFile);
// OutputStream out = new FileOutputStream(file); //
// 存储的文档名字为
} catch (Exception e) {
logger.error(e);
result = false;
}