⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
javax.activation

Class URLDataSource

java.lang.Object
|
+--javax.activation.URLDataSource

All Implemented Interfaces:
DataSource


public class URLDataSource
extends java.lang.Object
implements DataSource

DataSource implementation that retrieves its data from a URL.
Author:

Constructor Summary

URLDataSource(URL url)

Constructor.

Method Summary

String

getContentType()

Returns the Content-Type header for the URL.

InputStream

getInputStream()

String

getName()

Returns the result of getFile of the underlying URL.

OutputStream

getOutputStream()

URL

getURL()

Returns the underlying URL.

Constructor Details

URLDataSource

public URLDataSource(URL url)

Constructor. This will not open the connection to the URL.

Parameters:
url

Method Details

getContentType

public String getContentType()

Returns the Content-Type header for the URL. In the case of failure or lack of such a header, returns "application/octet-stream".


getInputStream

public InputStream getInputStream()


getName

public String getName()

Returns the result of getFile of the underlying URL.


getOutputStream

public OutputStream getOutputStream()


getURL

public URL getURL()

Returns the underlying URL.