public class UrlSource extends java.lang.Object implements Source
URL as a source.| Modifier and Type | Field and Description |
|---|---|
private java.net.URL |
url |
| Constructor and Description |
|---|
UrlSource(java.net.URL url)
Creates a new source backed by the specified URL.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getInputStream()
Gets a byte stream to the source contents.
|
java.lang.String |
getLocation()
Provides a user-friendly hint about the location of the source.
|
java.net.URL |
getUrl()
Gets the URL of this source.
|
java.lang.String |
toString() |
public UrlSource(java.net.URL url)
url - The file, must not be null.public java.io.InputStream getInputStream()
throws java.io.IOException
SourcegetInputStream in interface Sourcenull.java.io.IOExceptionpublic java.lang.String getLocation()
SourcegetLocation in interface Sourcenull.public java.net.URL getUrl()
null.public java.lang.String toString()
toString in class java.lang.Object