javax.activation
Class FileDataSource
java.lang.Object
javax.activation.FileDataSource
- DataSource
public class FileDataSource
extends java.lang.Object
Data source encapsulating a file.
FileDataSource
public FileDataSource(File file)
Constructor.
file
- the underlying file to use
FileDataSource
public FileDataSource(String name)
Constructor.
name
- the path to the underlying file to use
getFile
public File getFile()
Returns the underlying file.
setFileTypeMap
public void setFileTypeMap(FileTypeMap map)
Sets the file type map to use to determine the content type of the file.