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