| Constructor and Description |
|---|
UrlResource(String path)
Construct a new UrlResource from the given path
|
UrlResource(URL url)
Construct a new UrlResource from the given URL
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
Checks whether the URL resource exists or not.
|
File |
getFile()
Get the File associated with the resource
|
InputStream |
getInputStream()
Get the input stream associated with the resource
|
OutputStream |
getOutputStream()
Get the
OutputStream associated with the resource |
String |
getPath() |
String |
getResourceName()
Get the resource name
|
URL |
getURL()
Get the URL associated with the resource
|
String |
toString() |
public UrlResource(String path) throws MalformedURLException
path - MalformedURLExceptionpublic UrlResource(URL url)
url - public String getPath()
public boolean exists()
public InputStream getInputStream() throws IOException
getInputStream in interface ResourceIOExceptionpublic URL getURL()
public String getResourceName()
getResourceName in interface Resourcepublic OutputStream getOutputStream() throws IOException
OutputStream associated with the resourcegetOutputStream in interface ResourceOutputStreamIOException - if an IOException occursCopyright © 2014. All rights reserved.