OSDN Git Service

2015-02-26 複数の都道府県データを一括処理できるようにしました。
[convbusstop/convbusstop.git] / src / osm / jp / api / HttpPOST.java
index 875f0d0..825add1 100644 (file)
@@ -18,10 +18,10 @@ public class HttpPOST {
                double maxlat = 35.66d;\r
         double minlon = 138.99d;\r
                double maxlon = 139.79d;\r
-        getCapabilities(minlat, maxlat, minlon, maxlon);\r
+        getCapabilities(new File("."), minlat, maxlat, minlon, maxlon);\r
     }\r
        \r
-       public static void getCapabilities(double minLat, double maxLat, double minLon, double maxLon) throws MalformedURLException, ProtocolException, IOException {\r
+       public static void getCapabilities(File dir, double minLat, double maxLat, double minLon, double maxLon) throws MalformedURLException, ProtocolException, IOException {\r
                System.out.println(host + "/api/interpreter");\r
         URL url = new URL(host + "/api/interpreter");\r
 \r
@@ -57,7 +57,7 @@ public class HttpPOST {
 \r
         BufferedReader reader = new BufferedReader(new InputStreamReader(urlconn.getInputStream(), "UTF-8"));\r
 \r
-               File oFile = new File("existing.xml");\r
+               File oFile = new File(dir, "existing.xml");\r
                BufferedWriter hw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(oFile), "UTF-8"));\r
         while (true) {\r
             String line = reader.readLine();\r