InputStreamReader readLane = new InputStreamReader(new FileInputStream(file), "UTF-8");
BufferedReader bfLane = new BufferedReader(readLane);
while((readLine = bfLane.readLine()) != null){
}
OutputStreamWriter nodeOSW = new OutputStreamWriter(new FileOutputStream(nodeFile), "UTF-8");
nodeOSW.write("<osm>");
StringWriter outNode = new StringWriter();
XMLWriter writerNode = new XMLWriter(outNode, formater);
writerNode.write(node);
writerNode.close();
writerNode.flush();
oswNode.write(outNode.toString());
oswNode.close();
java输入输出流读取写入文件
最新推荐文章于 2024-06-21 01:05:35 发布