com.aspose.html

Class Url

    • Field Detail

      • UrlRecord

        public com.aspose.html.url.UrlRecord UrlRecord
    • Constructor Detail

      • Url

        public Url(String url)

        Initializes a new instance of the Url with the specified URL.

        Parameters:
        url - The URL to process.
        Throws:
        Error - TypeError: raised if url cannot be parsed as valid URL.
      • Url

        public Url(String url,
                   String baseUrl)

        Initializes a new instance of the Url with the specified URL and base URL.

        Parameters:
        url - The URL to process.
        baseUrl - The base URL.
        Throws:
        Error - TypeError: raised if url or baseUrl cannot be parsed as valid URL.
    • Method Detail

      • getOrigin

        @DOMNameAttribute(name="origin")
        public String getOrigin()

        Gets a string representation for the specified URL origin.

        Value: The origin.
      • getUsername

        @DOMNameAttribute(name="username")
        public String getUsername()

        Gets or sets a string representation for the specified URL username.

        Value: The username.
      • setUsername

        @DOMNameAttribute(name="username")
        public void setUsername(String value)

        Gets or sets a string representation for the specified URL username.

        Value: The username.
      • getPassword

        @DOMNameAttribute(name="password")
        public String getPassword()

        Gets or sets a string representation for the specified URL password.

        Value: The password.
      • setPassword

        @DOMNameAttribute(name="password")
        public void setPassword(String value)

        Gets or sets a string representation for the specified URL password.

        Value: The password.
      • getProtocol

        @DOMNameAttribute(name="protocol")
        public String getProtocol()

        Gets or sets a string representation for the specified URL schema.

        Value: The protocol.
      • setProtocol

        @DOMNameAttribute(name="protocol")
        public void setProtocol(String value)

        Gets or sets a string representation for the specified URL schema.

        Value: The protocol.
      • getHost

        @DOMNameAttribute(name="host")
        public String getHost()

        Gets or sets a string representation for the specified URL host.

        Value: The host.
      • setHost

        @DOMNameAttribute(name="host")
        public void setHost(String value)

        Gets or sets a string representation for the specified URL host.

        Value: The host.
      • getHostname

        @DOMNameAttribute(name="hostname")
        public String getHostname()

        Gets or sets a string representation for the specified URL hostname.

        Value: The name of the host.
      • setHostname

        @DOMNameAttribute(name="hostname")
        public void setHostname(String value)

        Gets or sets a string representation for the specified URL hostname.

        Value: The name of the host.
      • getPort

        @DOMNameAttribute(name="port")
        public String getPort()

        Gets or sets a string representation for the specified URL port.

        Value: The port.
      • setPort

        @DOMNameAttribute(name="port")
        public void setPort(String value)

        Gets or sets a string representation for the specified URL port.

        Value: The port.
      • getPathname

        @DOMNameAttribute(name="pathname")
        public String getPathname()

        Gets or sets a string representation for the specified URL path.

        Value: The name of the path.
      • setPathname

        @DOMNameAttribute(name="pathname")
        public void setPathname(String value)

        Gets or sets a string representation for the specified URL path.

        Value: The name of the path.
      • getSearch

        @DOMNameAttribute(name="search")
        public String getSearch()

        Gets or sets a string representation for the specified URL search segment.

        Value: The search.
      • setSearch

        @DOMNameAttribute(name="search")
        public void setSearch(String value)

        Gets or sets a string representation for the specified URL search segment.

        Value: The search.
      • getHash

        @DOMNameAttribute(name="hash")
        public String getHash()

        Gets or sets a string representation for the specified URL hash segment.

        Value: The hash.
      • setHash

        @DOMNameAttribute(name="hash")
        public void setHash(String value)

        Gets or sets a string representation for the specified URL hash segment.

        Value: The hash.
      • getHref

        @DOMNameAttribute(name="href")
        public String getHref()

        Gets or sets a serialized representation for the specified URL instance.

        Throws:
        Error - TypeError: raised if value cannot be parsed as valid URL. Value: The href.
      • setHref

        @DOMNameAttribute(name="href")
        public void setHref(String value)

        Gets or sets a serialized representation for the specified URL instance.

        Throws:
        Error - TypeError: raised if value cannot be parsed as valid URL. Value: The href.
      • toString

        public String toString()

        Returns a String that represents this instance.

        Overrides:
        toString in class Object
        Returns:
        A String that represents this instance.
      • equals

        public boolean equals(Object obj)

        Determines whether the specified Object, is equal to this instance.

        Overrides:
        equals in class Object
        Parameters:
        obj - The Object to compare with this instance.
        Returns:
        true if the specified Object is equal to this instance; otherwise, false.
      • equals

        public boolean equals(Url url)

        Determines whether the specified Url, is equal to this instance.

        Parameters:
        url - The Url to compare with this instance.
        Returns:
        true if the specified Url is equal to this instance; otherwise, false.
      • equals

        public boolean equals(Url url,
                              boolean excludeFragments)

        Determines whether the specified Url, is equal to this instance.

        Parameters:
        url - The Url to compare with this instance.
        excludeFragments - Flag which indicates whether or not fragment segment is excluded from comparison. true if excluded, false otherwise. Default value is false.
        Returns:
        true if the specified Url is equal to this instance; otherwise, false.
      • hashCode

        public int hashCode()

        Returns a hash code for this instance.

        Overrides:
        hashCode in class Object
        Returns:
        A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.