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