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 DataLocationIOExceptionDataLocation.getInputStream()public OutputStream getOutputStream() throws IOException
getOutputStream in interface DataLocationUnsupportedOperationException - alwaysIOExceptionDataLocation.getOutputStream()public Writer getWriter() throws IOException
getWriter in interface DataLocationUnsupportedOperationException - alwaysIOExceptionDataLocation.getWriter()public Reader getReader() throws IOException
getReader in interface DataLocationIOExceptionpublic String getType()
getType in interface DataLocationpublic String toString()
toString in interface DataLocationtoString in class Objectpublic boolean hasReaderSupport()
hasReaderSupport in interface DataLocationpublic boolean hasWriterSupport()
hasWriterSupport in interface DataLocationpublic boolean isWritable()
isWritable in interface DataLocationpublic void inputStreamClosed()
inputStreamClosed in interface DataLocationpublic void outputStreamClosed()
outputStreamClosed in interface DataLocationpublic void readerClosed()
readerClosed in interface DataLocationpublic void writerClosed()
writerClosed in interface DataLocation