public class URLDataSource extends Object implements DataSource
| Constructor and Description |
|---|
URLDataSource(URL url)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType()
Returns the Content-Type header for the URL.
|
InputStream |
getInputStream()
Returns an input stream from which the data can be read.
|
String |
getName()
Returns the result of
getFile of the underlying URL. |
OutputStream |
getOutputStream()
Returns an output stream to which the data can be written.
|
URL |
getURL()
Returns the underlying URL.
|
public URLDataSource(URL url)
public String getContentType()
getContentType in interface DataSourcepublic String getName()
getFile of the underlying URL.getName in interface DataSourcepublic InputStream getInputStream() throws IOException
DataSourcegetInputStream in interface DataSourceIOExceptionpublic OutputStream getOutputStream() throws IOException
DataSourcegetOutputStream in interface DataSourceIOExceptionpublic URL getURL()