| Modifier and Type | Field and Description |
|---|---|
private java.net.URL |
url
Location of resource.
|
| Constructor and Description |
|---|
URLResource(java.net.URL url)
Creates a new URL resource.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getInputStream()
Gets an input stream around the resource.
|
java.lang.String |
toString() |
public URLResource(java.net.URL url)
url - Non-null URL where resource is located.public java.io.InputStream getInputStream()
throws java.io.IOException
ResourceInputStream.close() unless otherwise noted.
Implementers should produce a new instance on every call to this method to provide for thread-safe usage patterns on a shared resource.
getInputStream in interface Resourcejava.io.IOException - On IO errors.public java.lang.String toString()
toString in class java.lang.Object