public class URLDataLocation extends Object implements DataLocation
Modifier and Type | Field and Description |
---|---|
static String |
LOCATION_TYPE_FILE |
private URL |
url |
Constructor and Description |
---|
URLDataLocation(URL url) |
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream()
return the URL's input stream
|
OutputStream |
getOutputStream() |
Reader |
getReader() |
String |
getType() |
Writer |
getWriter() |
boolean |
hasReaderSupport() |
boolean |
hasWriterSupport() |
void |
inputStreamClosed() |
boolean |
isWritable() |
void |
outputStreamClosed() |
void |
readerClosed() |
String |
toString() |
void |
writerClosed() |
private URL url
public static final String LOCATION_TYPE_FILE
public URLDataLocation(URL url)
public InputStream getInputStream() throws IOException
getInputStream
in interface DataLocation
IOException
DataLocation.getInputStream()
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface DataLocation
UnsupportedOperationException
- alwaysIOException
DataLocation.getOutputStream()
public Writer getWriter() throws IOException
getWriter
in interface DataLocation
UnsupportedOperationException
- alwaysIOException
DataLocation.getWriter()
public Reader getReader() throws IOException
getReader
in interface DataLocation
IOException
public String getType()
getType
in interface DataLocation
public String toString()
toString
in interface DataLocation
toString
in class Object
public boolean hasReaderSupport()
hasReaderSupport
in interface DataLocation
public boolean hasWriterSupport()
hasWriterSupport
in interface DataLocation
public boolean isWritable()
isWritable
in interface DataLocation
public void inputStreamClosed()
inputStreamClosed
in interface DataLocation
public void outputStreamClosed()
outputStreamClosed
in interface DataLocation
public void readerClosed()
readerClosed
in interface DataLocation
public void writerClosed()
writerClosed
in interface DataLocation