良い一日。Objective-CからJavaに切り替えて、URLの内容を通常どおり文字列に読み込もうとしています。たくさんの投稿を読んでも、それでもゴミが出ます。
public class TableMain {
/**
* @param args
*/
@SuppressWarnings("deprecation")
public static void main(String[] args) throws Exception {
URL url = null;
URLConnection urlConn = null;
try {
url = new URL("http://svo.aero/timetable/today/");
} catch (MalformedURLException err) {
err.printStackTrace();
}
try {
urlConn = url.openConnection();
} catch (IOException e) {
e.printStackTrace();
}
try {
BufferedReader input = new BufferedReader(new InputStreamReader(
urlConn.getInputStream(), "UTF-8"));
StringBuilder strB = new StringBuilder();
String str;
while (null != (str = input.readLine())) {
strB.append(str).append("\r\n");
System.out.println(str);
}
input.close();
} catch (IOException err) {
err.printStackTrace();
}
}
}
どうしたの?私はこのようなものを手に入れます
?? y ??'??)j1 ???-?q?E?| V ??、?? <9 ?? d?Bw(?э?n?v?)i?x ????? Z ???? q?MM3〜?????? G??љ??l?U3 "Y?] ???? zxxDx ???? t ^ ??? 5 ??? j? ?k ?? u?q?j6?^ t ??????? W ??????????〜????????? o6 /?|?8 ?? {? ?? O ???? 0?M> Z {srs ?? K ??? XV ?? 4Z ??'?? n / ?? ^ ?? 4 ???? w + ????? e? ?????? [?{/ ??、?? WO ?????????。?。?x ??????? ^?rax ??]?xb ?? &amp; ?? 8; ?????} ??? h ???? H5 ???? v?e?0 ?????-????? g?vN