class 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;
    }

}