public static void main(String[] args) { StringBuilder sb =new StringBuilder(); InputStream resourceAsStream = GetSourceTest.class.getResourceAsStream("test.json"); try { BufferedReader br = new BufferedReader( new InputStreamReader(resourceAsStream,"UTF-8")); for (String line = br.readLine(); line != null; line = br.readLine()) { if (StringUtil.isNotBlank(line)) { sb.append(line); } } System.out.println(sb.toString()); } catch (Exception e) { e.printStackTrace(); } }