Class Urls

java.lang.Object
org.lobobrowser.util.Urls

public class Urls extends Object
  • Field Details

    • PATTERN_RFC1123

      public static final DateFormat PATTERN_RFC1123
  • Method Details

    • isLocal

      public static boolean isLocal(URL url)
      Whether the URL refers to a resource in the local file system.
    • isLocalFile

      public static boolean isLocalFile(URL url)
      Whether the URL is a file in the local file system.
    • hasHost

      public static boolean hasHost(URL url)
    • createURL

      public static URL createURL(URL baseUrl, String relativeUrl) throws MalformedURLException
      Creates an absolute URL in a manner equivalent to major browsers.
      Throws:
      MalformedURLException
    • getExpiration

      public static Long getExpiration(URLConnection connection, long baseTime)
      Returns the time when the document should be considered expired. The time will be zero if the document always needs to be revalidated. It will be null if no expiration time is specified.
    • getHeaders

      public static List getHeaders(URLConnection connection)
    • guessURL

      public static URL guessURL(URL baseURL, String spec) throws MalformedURLException
      Throws:
      MalformedURLException
    • guessURL

      public static URL guessURL(String spec) throws MalformedURLException
      Throws:
      MalformedURLException
    • getCharset

      public static String getCharset(URLConnection connection)
    • getNoRefForm

      public static String getNoRefForm(URL url)
    • sameNoRefURL

      public static boolean sameNoRefURL(URL url1, URL url2)
      Comparison that does not consider Ref.
      Parameters:
      url1 -
      url2 -