Class URL

java.lang.Object
com.codename1.io.URL

public class URL extends java.lang.Object
This class provides a similar API to URL making it almost into a "drop in" replacement. It is placed in a different package because it is incompatible to URL by definition. It is useful in getting some simple code to work without too many changes
  • Constructor Details

    • URL

      public URL(String url) throws java.net.URISyntaxException
      Throws:
      java.net.URISyntaxException
  • Method Details

    • getQuery

      public String getQuery()
    • getPath

      public String getPath()
    • getUserInfo

      public String getUserInfo()
    • getAuthority

      public String getAuthority()
    • getPort

      public int getPort()
    • getDefaultPort

      public int getDefaultPort()
    • getProtocol

      public String getProtocol()
    • getHost

      public String getHost()
    • getFile

      public String getFile()
    • equals

      public boolean equals(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • sameFile

      public boolean sameFile(URL u)
    • toString

      public String toString()
      Overrides:
      toString in class java.lang.Object
    • toExternalForm

      public String toExternalForm()
    • toURI

      public java.net.URI toURI() throws java.net.URISyntaxException
      Throws:
      java.net.URISyntaxException
    • openConnection

      public URL.URLConnection openConnection() throws java.io.IOException
      Throws:
      java.io.IOException
    • openStream

      public final java.io.InputStream openStream() throws java.io.IOException
      Throws:
      java.io.IOException