Java1.6のファイルの読み込みなー
BufferedReader br = null; try { br = new BufferedReader(new InputStreamReader(this.getClass().getResourceAsStream(resourceNatureOfInquiry), "UTF-8")); String str = br.readLine(); while (str != null) { System.out.println(str); m.put(str, str); str = br.readLine(); } } catch (Exception e) { e.printStackTrace(); // do nothing } finally { try { br.close(); } catch (Exception ex) { ex.printStackTrace(); // do nothing } }
追記 2017/2/1
Apache commons のcommon-ioでまるっと読み込むのが正しいのかも