private static String inputStreamToString(
    InputStream stream
  ) throws IOException {
    StringBuilder sb = new StringBuilder();
    InputStreamReader isr = new InputStreamReader(stream, "UTF-8");
    BufferedReader br = new BufferedReader(isr);
    String read;
    while((read = br.readLine()) != null) {
      sb.append(read);
    }
    br.close();
    return sb.toString();
  }
Loads a JSONArray of emojis from an InputStream, parses it and returns the
associated list of {@link com.vdurmont.emoji.Emoji}s

@param stream the stream of the JSONArray

@return the list of {@link com.vdurmont.emoji.Emoji}s
@throws IOException if an error occurs while reading the stream or parsing
the JSONArray
src/main/java/com/vdurmont/emoji/EmojiLoader.java