下面的代码实现了数据导出,并实现了数据导入到其他系统中.,包括附件的处理.
public void run(String servername, String username, String password,
String dbname, String viewname) {
try {
// 取得配置文件取得临时中专的文件目录.提交的数据到服务的名称 ,端口
ResourceBundle localizationResources = ResourceBundle
.getBundle("ip");
// 临时目录
String temppath = localizationResources.getString("temppath");
// 端口
String port = localizationResources.getString("port");
// 应用名称
String webapp = localizationResources.getString("webapp");
// 文档数量
int rundocnum = 0;
// 附件的文件数量
int filenum = 0;
// 应用的域名
String dominoHost = servername;// "dev1";
// 数据操作的 session
Session session;
// 通过 http 获取 IOR
String strIOR = null;
URL url = new URL("http://" + dominoHost + "/diiop_ior.txt");
InputStream in = url.openStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
for (boolean bExit = false; !bExit;) {
String line = br.readLine();
if (line == null) {
bExit = true;
} else {
if (strIOR == null)
strIOR = line;
else
strIOR = strIOR + line;
if (strIOR.startsWith("IOR:"))
bExit = true;
}
}
br.close();
// System.out.println("strIOR - " + strIOR);
评论0