Package echo.util

Class UrlWrapper

java.lang.Object
echo.util.UrlWrapper

class UrlWrapper extends Object
Wraps the java URL class so that it exposes methods to determine if entered values are urls or not.
  • Field Details

    • spec

      private final String spec
  • Constructor Details

    • UrlWrapper

      public UrlWrapper(String spec)
      Creates a new UrlWrapper with a supplied url
  • Method Details

    • isUrl

      public boolean isUrl()
      Returns true if the specified string is a URL
    • openStream

      public InputStream openStream() throws IOException
      Open an input stream to the location of the url
      Throws:
      IOException