docs: public <T> List<T> query(String query, Class<T> classOfT) {
          InputStream instream = null;
          List<T> result = new ArrayList<T>();
          try {
              Reader reader = new InputStreamReader(instream = queryForStream(query), "UTF-8");
              JsonObject json = new JsonParser().parse(reader).getAsJsonObject();
              if (json.has("rows")) {
                  if (!includeDocs) {
                      log.warning("includeDocs set to false and attempting to retrieve doc. " +
                              "null object will be returned");
                  }
                  for (JsonElement e : json.getAsJsonArray("rows")) {
                      result.add(jsonToObject(client.getGson(), e, "doc", classOfT));
                  }
              } else {
                  log.warning("No ungrouped result available. Use queryGroups() if grouping set");
              }
              return result;
          } catch (UnsupportedEncodingException e1) {
              // This should never happen as every implementation of the java platform is required
              // to support UTF-8.
              throw new RuntimeException(e1);
          } finally {
              close(instream);
          }
      }