public class FileTypeMappedURLDataSource
extends javax.activation.URLDataSource
| Constructor and Description |
|---|
FileTypeMappedURLDataSource(java.net.URL url)
FileTypeMappedURLDataSource constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getContentType()
Returns the value of the URL content-type header field.
|
public FileTypeMappedURLDataSource(java.net.URL url)
The FileTypedMappedURLDataSource class will not open a connection to the URL until a method requiring it to do so is called.
url - The URL to be encapsulated in this object.public java.lang.String getContentType()
If this gives not a satisfactory result (either 'content/unknown' or 'application/octet-stream') then this method uses the currently installed FileTypeMap to guess the content type.
getContentType in interface javax.activation.DataSourcegetContentType in class javax.activation.URLDataSource