Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.activation.FileDataSource
Constructor Summary | |
| |
|
Method Summary | |
String |
|
File |
|
InputStream |
|
String |
|
OutputStream |
|
void |
|
public FileDataSource(File file)
Constructor.
- Parameters:
file
- the underlying file to use
public FileDataSource(String name)
Constructor.
- Parameters:
name
- the path to the underlying file to use
public String getContentType()
Returns the MIME content type of the data.
- Specified by:
- getContentType in interface DataSource
public File getFile()
Returns the underlying file.
public InputStream getInputStream() throws IOException
Returns an input stream from which the data can be read.
- Specified by:
- getInputStream in interface DataSource
public String getName()
Returns the underlying name of this object.
- Specified by:
- getName in interface DataSource
public OutputStream getOutputStream() throws IOException
Returns an output stream to which the data can be written.
- Specified by:
- getOutputStream in interface DataSource
public void setFileTypeMap(FileTypeMap map)
Sets the file type map to use to determine the content type of the file.
- Parameters:
map
- the file type map