Package org.json

Examples of org.json.JSONObject.optLong()


    try {
      scannerDescriptor = new JSONObject(new String(input));

      columnArray = scannerDescriptor.optJSONArray(RESTConstants.COLUMNS);
      timestamp = scannerDescriptor.optLong(RESTConstants.SCANNER_TIMESTAMP);
      startRow = Bytes.toBytes(scannerDescriptor.optString(
          RESTConstants.SCANNER_START_ROW, ""));
      stopRow = Bytes.toBytes(scannerDescriptor.optString(
          RESTConstants.SCANNER_STOP_ROW, ""));
      filters = scannerDescriptor.optString(RESTConstants.SCANNER_FILTER);
View Full Code Here


        JSONObject cookie = cookies.optJSONObject(i);
        String name = cookie.optString("name");
        String value = cookie.optString("value");
        String domain = cookie.optString("domain");
        String path = cookie.optString("path");
        Date expiry = new Date(cookie.optLong("expires"));
        boolean isSecure = cookie.optBoolean("secure");
        Cookie c = new Cookie(name, value, domain, path, expiry, isSecure);
        res.add(c);
      }
      return res;
View Full Code Here

                }
                String etag = jo.optString(PROPERTY_ETAG);
                if (etag != null) {
                    history.put(RecrawlAttributeConstants.A_ETAG_HEADER, etag);
                }
                long lastmod = jo.optLong(PROPERTY_LAST_MODIFIED);
                if (lastmod > 0) {
                    history.put(RecrawlAttributeConstants.A_LAST_MODIFIED_HEADER, FetchHistoryHelper.formatHttpDate(lastmod));
                }
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.