Class URLFileUpdater

  • All Implemented Interfaces:
    FileUpdater

    public class URLFileUpdater
    extends java.lang.Object
    implements FileUpdater
    URLUpdater updates a file by getting the contents of a url, with optional caching, and mime type accept header.
    • Constructor Detail

      • URLFileUpdater

        public URLFileUpdater​(java.net.URL url,
                              java.lang.String acceptHeader,
                              int timeout,
                              java.io.File cacheMetadataFile,
                              java.io.File cachedContent,
                              boolean useCaching,
                              java.lang.String username,
                              java.lang.String password)
        Create a URLUpdater
        Parameters:
        url - the URL
        acceptHeader - contents of accept header, or null
        timeout - in seconds, -1 means use the default timeout, and 0 means no timeout
        cacheMetadataFile - file to store cache metadata
        cachedContent - file containing previously cached content
        useCaching - true to use caching
        username - username
        password - password
    • Method Detail

      • factory

        public static URLFileUpdaterFactory factory()
        Returns:
        a URLFileUpdaterFactory for constructing the FileUpdater
      • getContentType

        public java.lang.String getContentType()
      • getResultCode

        public int getResultCode()
      • getReasonCode

        public java.lang.String getReasonCode()