URL
object in a DataSource interface. URLDataSource simplifies the handling
of data described by URLs within the JavaBeans Activation Framework
because this class can be used to create new DataHandlers.Note
The DataHandler object creates a URLDataSource internally, when it is constructed with a URL.
javax.activation.DataSource, javax.activation.DataHandler
| Modifier and Type | Field and Description |
|---|---|
| private URL | |
| private URLConnection |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the content type.Implements javax. |
| public InputStream | Returns: the InputStream.Implements javax. |
| public String | Returns: the result of calling the URL's getFile method.Implements javax. getFile method on the URL used to
instantiate the object.
|
| public OutputStream | Returns: the OutputStream.Implements javax. |
| public URL |
| url | back to summary |
|---|---|
| private URL url | |
| url_conn | back to summary |
|---|---|
| private URLConnection url_conn | |
| URLDataSource | back to summary |
|---|---|
| public URLDataSource(URL url) URLDataSource constructor. The URLDataSource class will not open a connection to the URL until a method requiring it to do so is called.
| |
| getContentType | back to summary |
|---|---|
| public String getContentType() Implements javax. Returns the value of the URL content-type header field.
It calls the URL's Note this method attempts to call the
| |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() throws IOException Implements javax. The getInputStream method from the URL. Calls the
| |
| getName | back to summary |
|---|---|
| public String getName() Implements javax. Calls the
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() throws IOException Implements javax. The getOutputStream method from the URL. First an attempt is made to get the URLConnection object for the URL. If that succeeds, the getOutputStream method on the URLConnection is returned.
| |
| getURL | back to summary |
|---|---|
| public URL getURL() Return the URL used to create this DataSource.
| |