@Test public void test() throws IOException { String mappingTrans = ElasticsearchUtil.transferJsonToMapping(PropertyUtils.class.getResourceAsStream(FILE_JSON)); System.out.println(mappingTrans); System.out.println(mapping); assertEquals(mapping, mappingTrans); }
public static String transferJsonToMapping(InputStream is) throws IOException{ final String mapping; try (BufferedReader buffer = new BufferedReader(new InputStreamReader(is))) { mapping = buffer.lines().collect(Collectors.joining("\n")); } return mapping; }
ElasticsearchUtil { public static String transferJsonToMapping(InputStream is) throws IOException{ final String mapping; try (BufferedReader buffer = new BufferedReader(new InputStreamReader(is))) { mapping = buffer.lines().collect(Collectors.joining("\n")); } return mapping; } }
ElasticsearchUtil { public static String transferJsonToMapping(InputStream is) throws IOException{ final String mapping; try (BufferedReader buffer = new BufferedReader(new InputStreamReader(is))) { mapping = buffer.lines().collect(Collectors.joining("\n")); } return mapping; }  }
ElasticsearchUtil { public static String transferJsonToMapping(InputStream is) throws IOException{ final String mapping; try (BufferedReader buffer = new BufferedReader(new InputStreamReader(is))) { mapping = buffer.lines().collect(Collectors.joining("\n")); } return mapping; }  static String transferJsonToMapping(InputStream is); }
ElasticsearchUtil { public static String transferJsonToMapping(InputStream is) throws IOException{ final String mapping; try (BufferedReader buffer = new BufferedReader(new InputStreamReader(is))) { mapping = buffer.lines().collect(Collectors.joining("\n")); } return mapping; }  static String transferJsonToMapping(InputStream is);  }