Class Page

    • Constructor Detail

      • Page

        public Page()
    • Method Detail

      • fail

        public static Page fail()
      • setSkip

        public Page setSkip​(boolean skip)
      • putField

        public void putField​(java.lang.String key,
                             java.lang.Object field)
        store extract results
        Parameters:
        key - key
        field - field
      • getHtml

        public Html getHtml()
        get html content of page
        Returns:
        html
      • getJson

        public Json getJson()
        get json content of page
        Returns:
        json
        Since:
        0.5.0
      • setHtml

        public void setHtml​(Html html)
        Deprecated.
        since 0.4.0 The html is parse just when first time of calling getHtml(), so use setRawText(String) instead.
        Parameters:
        html - html
      • getTargetRequests

        public java.util.List<Request> getTargetRequests()
      • addTargetRequests

        public void addTargetRequests​(java.util.List<java.lang.String> requests)
        add urls to fetch
        Parameters:
        requests - requests
      • addTargetRequests

        public void addTargetRequests​(java.util.List<java.lang.String> requests,
                                      long priority)
        add urls to fetch
        Parameters:
        requests - requests
        priority - priority
      • addTargetRequest

        public void addTargetRequest​(java.lang.String requestString)
        add url to fetch
        Parameters:
        requestString - requestString
      • addTargetRequest

        public void addTargetRequest​(Request request)
        add requests to fetch
        Parameters:
        request - request
      • getUrl

        public Selectable getUrl()
        get url of current page
        Returns:
        url of current page
      • getRequest

        public Request getRequest()
        get request of current page
        Returns:
        request
      • setRequest

        public void setRequest​(Request request)
      • getStatusCode

        public int getStatusCode()
      • setStatusCode

        public void setStatusCode​(int statusCode)
      • getRawText

        public java.lang.String getRawText()
      • setRawText

        public Page setRawText​(java.lang.String rawText)
      • getHeaders

        public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders()
      • setHeaders

        public void setHeaders​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> headers)
      • isDownloadSuccess

        public boolean isDownloadSuccess()
      • setDownloadSuccess

        public void setDownloadSuccess​(boolean downloadSuccess)
      • getBytes

        public byte[] getBytes()
      • setBytes

        public void setBytes​(byte[] bytes)
      • getCharset

        public java.lang.String getCharset()
      • setCharset

        public void setCharset​(java.lang.String charset)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object