public class URLLocation extends AbstractLocation<URL>
Location interface allows writing to and reading from a URL.eventsEnabled, listeners, path| Constructor and Description |
|---|
URLLocation(String url)
Initialize this location with the specified file path.
|
URLLocation(URL url)
Initialize this location with the specified file path.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream()
Obtain an input stream to read from this location.
|
OutputStream |
getOutputStream()
Obtain an output stream to write to this location.
|
long |
size()
This method always returns -1, as there is no reliable way to know the actual size of available data.
|
addLocationEventListener, copyTo, fireLocationEvent, getPath, removeLocationEventListener, toByteArray, toStringpublic URLLocation(URL url)
url - a URL.public URLLocation(String url) throws MalformedURLException
url - a URL in string format.MalformedURLException - if the url is malformed.public InputStream getInputStream() throws Exception
InputStream instance.Exception - if an I/O error occurs.Location.getInputStream()public OutputStream getOutputStream() throws Exception
OutputStream instance.Exception - if an I/O error occurs.Location.getOutputStream()public long size()
Location.size()Copyright © 2005-2012 JPPF Team.