NetFunctions.HttpPage (SelekTOR Java Documentation)
Date: 2017-04-14

lib

## Class NetFunctions.HttpPage

- java.lang.Object
- - lib.NetFunctions.HttpPage

- Enclosing class:
    NetFunctions

      public static final class NetFunctions.HttpPage
      extends java.lang.Object

  Store an http formatted web page

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `PATTERN_ASCTIME`
    `static java.lang.String` | `PATTERN_RFC1036`
    `static java.lang.String` | `PATTERN_RFC1123`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpPage(java.io.InputStream is)` Store webpage from the given input stream

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getBodyAsString()` Retrieve http body as string should only be used with text content
    `long` | `getExpires()`
    `long` | `getLastModified()`
    `java.lang.String` | `getProperty(java.lang.String key)` Get various properties of the web page
    `long` | `getServerDate()`
    `boolean` | `isHeaderOK()`
    `void` | `retrieveHeader()` Retrieve http header info
    `boolean` | `saveBodyToFile(java.lang.String dest, javax.swing.JProgressBar jpb)` Save http body to a file, applies to all types of content

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PATTERN_RFC1123

          public static final java.lang.String PATTERN_RFC1123

      See Also:
        Constant Field Values

    - #### PATTERN_RFC1036

          public static final java.lang.String PATTERN_RFC1036

      See Also:
        Constant Field Values

    - #### PATTERN_ASCTIME

          public static final java.lang.String PATTERN_ASCTIME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HttpPage

          public HttpPage(java.io.InputStream is)

      Store webpage from the given input stream
      Parameters:
        `is` -

  - ### Method Detail

    - #### retrieveHeader

          public final void retrieveHeader()

      Retrieve http header info

    - #### getBodyAsString

          public final java.lang.String getBodyAsString()

      Retrieve http body as string should only be used with text content
      Returns:
        null if failed, otherwise returns the contents

    - #### saveBodyToFile

          public final boolean saveBodyToFile(java.lang.String dest,
                                              javax.swing.JProgressBar jpb)

      Save http body to a file, applies to all types of content
      Parameters:
        `dest` - File destination
        `jpb` - Progress bar
      Returns:
        true if successful

    - #### getProperty

          public final java.lang.String getProperty(java.lang.String key)

      Get various properties of the web page
      Parameters:
        `key` -
      Returns:
        property string

    - #### getLastModified

          public final long getLastModified()

    - #### getServerDate

          public final long getServerDate()

    - #### getExpires

          public final long getExpires()

    - #### isHeaderOK

          public final boolean isHeaderOK()