code: public static JSONArtifact parse(InputStream is, boolean order) throws IOException, NullPointerException {
          if (is != null) {
              BufferedReader reader = null;
              try {
                  reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
              } catch (Exception ex) {
                  IOException iox = new IOException("Could not construct UTF-8 character reader for the InputStream");
                  iox.initCause(ex);
                  throw iox;
              }
              return parse(reader,order);
          } else {
              throw new NullPointerException("is cannot be null");
          }
  
      }
docs: Parse a InputStream of JSON text into a JSONArtifact.
  Note that the provided InputStream is not closed on completion of read; that is left to the caller.
  @param is The input stream to read from.  The content is assumed to be UTF-8 encoded and handled as such.
  @param order Boolean flag indicating if the order of the JSON data should be preserved.  This parameter only has an effect if the stream is JSON Object { ... } formatted data.
  
  @return Returns an instance of JSONArtifact (JSONObject or JSONArray), corrisponding to if the input stream was Object or Array notation.
  
  @throws IOException Thrown on IO errors during parse.
  @throws NullPointerException Thrown if reader is null