com.aspose.html

Class Url

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      UrlRecord UrlRecord 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Url(String url)
      Initializes a new instance of the Url with the specified URL.
      Url(String url, String baseUrl)
      Initializes a new instance of the Url with the specified URL and base URL.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Determines whether the specified object, is equal to this instance.
      boolean equals(Url url)
      Determines whether the specified Url, is equal to this instance.
      String getHash()
      Gets or sets a string representation for the specified URL hash segment.
      String getHost()
      Gets or sets a string representation for the specified URL host.
      String getHostname()
      Gets or sets a string representation for the specified URL hostname.
      String getHref()
      Gets or sets a serialized representation for the specified URL instance.
      String getOrigin()
      Gets a string representation for the specified URL origin.
      String getPassword()
      Gets or sets a string representation for the specified URL password.
      String getPathname()
      Gets or sets a string representation for the specified URL path.
      String getPort()
      Gets or sets a string representation for the specified URL port.
      String getProtocol()
      Gets or sets a string representation for the specified URL schema.
      String getSearch()
      Gets or sets a string representation for the specified URL search segment.
      IUrlSearchParams getSearchParams()
      Gets an associated IUrlSearchParams object.
      String getUsername()
      Gets or sets a string representation for the specified URL username.
      int hashCode()
      Returns a hash code for this instance.
      void setHash(String value)
      Gets or sets a string representation for the specified URL hash segment.
      void setHost(String value)
      Gets or sets a string representation for the specified URL host.
      void setHostname(String value)
      Gets or sets a string representation for the specified URL hostname.
      void setHref(String value)
      Gets or sets a serialized representation for the specified URL instance.
      void setPassword(String value)
      Gets or sets a string representation for the specified URL password.
      void setPathname(String value)
      Gets or sets a string representation for the specified URL path.
      void setPort(String value)
      Gets or sets a string representation for the specified URL port.
      void setProtocol(String value)
      Gets or sets a string representation for the specified URL schema.
      void setSearch(String value)
      Gets or sets a string representation for the specified URL search segment.
      void setUsername(String value)
      Gets or sets a string representation for the specified URL username.
      String toJson()
      Returns a string that represents this instance.
      String toString()
      Returns a string that represents this instance.
    • Field Detail

      • UrlRecord

        public 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:
        com.aspose.ms.System.Net.Sockets.SocketError - 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:
        com.aspose.ms.System.Net.Sockets.SocketError - 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.
      • toJson

        @DOMNameAttribute(name="toJSON")
        public String toJson()

        Returns a string that represents this instance.

        Returns:
        A string that represents this instance.
      • 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:
        com.aspose.ms.System.Net.Sockets.SocketError - 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:
        com.aspose.ms.System.Net.Sockets.SocketError - 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.
      • 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.