Class UrlLoader

    • Constructor Summary

      Constructors 
      Constructor Description
      UrlLoader​(java.lang.String url, long expiration)  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.String base64​(byte[] in)  
      protected boolean checkAndLoadCache()  
      private boolean didNotChange​(java.net.URLConnection connection)  
      protected abstract boolean doRead​(java.io.InputStream is)  
      java.lang.String getUrl()  
      private boolean isGzipStream​(java.io.InputStream is)  
      private boolean read​(java.net.URLConnection connection)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • HEADER_ACCEPT_ENCODING

        public static final java.lang.String HEADER_ACCEPT_ENCODING
        See Also:
        Constant Field Values
      • url

        private final java.lang.String url
      • expiration

        private final long expiration
      • lastModified

        private long lastModified
      • lastChecked

        private long lastChecked
    • Constructor Detail

      • UrlLoader

        public UrlLoader​(java.lang.String url,
                         long expiration)
    • Method Detail

      • getUrl

        public java.lang.String getUrl()
      • checkAndLoadCache

        protected boolean checkAndLoadCache()
      • didNotChange

        private boolean didNotChange​(java.net.URLConnection connection)
      • read

        private boolean read​(java.net.URLConnection connection)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • isGzipStream

        private boolean isGzipStream​(java.io.InputStream is)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • doRead

        protected abstract boolean doRead​(java.io.InputStream is)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • base64

        protected static java.lang.String base64​(byte[] in)