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 DataSource
public String getName()
getFile
of the underlying URL.getName
in interface DataSource
public InputStream getInputStream() throws IOException
DataSource
getInputStream
in interface DataSource
IOException
public OutputStream getOutputStream() throws IOException
DataSource
getOutputStream
in interface DataSource
IOException