|
DRAFT | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.activation.URLDataSource
public class URLDataSource
The URLDataSource class provides an object that wraps a 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.
DataSource,
DataHandler| Constructor Summary | |
|---|---|
URLDataSource(java.net.URL url)
URLDataSource constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getContentType()
Returns the value of the URL content-type header field. |
java.io.InputStream |
getInputStream()
The getInputStream method from the URL. |
java.lang.String |
getName()
Calls the getFile method on the URL used to
instantiate the object. |
java.io.OutputStream |
getOutputStream()
The getOutputStream method from the URL. |
java.net.URL |
getURL()
Return the URL used to create this DataSource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public URLDataSource(java.net.URL url)
url - The URL to be encapsulated in this object.| Method Detail |
|---|
public java.lang.String getContentType()
URLConnection.getContentType method
after retrieving a URLConnection object.
Note: this method attempts to call the openConnection
method on the URL. If this method fails, or if a content type is not
returned from the URLConnection, getContentType returns
"application/octet-stream" as the content type.
getContentType in interface DataSourcepublic java.lang.String getName()
getFile method on the URL used to
instantiate the object.
getName in interface DataSource
public java.io.InputStream getInputStream()
throws java.io.IOException
openStream method on the URL.
getInputStream in interface DataSourcejava.io.IOException
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in interface DataSourcejava.io.IOExceptionpublic java.net.URL getURL()
|
DRAFT | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.
Generated on 24-November-2009 03:24