code: static public JSONArray parse(Reader reader) throws IOException {
  
          /** 
           * We can just build a pseudo-object and use it to contain the array text.  
           * Then we just get the value off the object and return it!  Easy.
           */
          StringBuffer buf = new StringBuffer("");
          buf.append("{\"jsonArray\":");
  
          char data[] = new char[8196];
          int amtRead = 0;
          amtRead = reader.read(data,0,8196);
          while (amtRead != -1)
          {
              buf.append(data,0,amtRead);
              amtRead = reader.read(data,0,8196);
          }
          buf.append("}");
          
          /**
           * Now parse it and return the array object.
           */
          JSONObject obj = JSONObject.parse(buf.toString());
          return (JSONArray)obj.get("jsonArray");
      }
docs: Convert a stream (in reader form) of JSONArray text into object form.
  @param reader The reader from which the JSONArray data is read.
  @return The contructed JSONArray Object.
  
  @throws IOEXception Thrown if an underlying IO error from the reader occurs, or if malformed JSON is read,