|
Préférences
Moteurs de recherche
|
||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
javax.activation
|
Constructor Summary | |
---|---|
URLDataSource(URL url)
URLDataSource constructor. |
Method Summary | |
---|---|
String |
getContentType()
Returns the value of the URL content-type header field. |
InputStream |
getInputStream()
The getInputStream method from the URL. |
String |
getName()
Calls the getFile method on the URL used to
instantiate the object. |
OutputStream |
getOutputStream()
The getOutputStream method from the URL. |
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(URL url)
url
- The URL to be encapsulated in this object.Method Detail |
---|
public 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 DataSource
public String getName()
getFile
method on the URL used to
instantiate the object.
getName
in interface DataSource
public InputStream getInputStream() throws IOException
openStream
method on the URL.
getInputStream
in interface DataSource
IOException
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface DataSource
IOException
public URL getURL()