public class FileDataSource extends Object implements DataSource
Constructor and Description |
---|
FileDataSource(File file)
Creates a FileDataSource from a File object
|
FileDataSource(String name)
Creates a FileDataSource from the specified path name
|
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
Returns the content type of the data source
|
File |
getFile()
Returns the data source file
|
InputStream |
getInputStream()
Return the InputStream obtained from the data source
|
String |
getName()
Returns the name of the data source object
|
OutputStream |
getOutputStream()
Return the OutputStream obtained from the data source
|
void |
setFileTypeMap(FileTypeMap map)
Sets the FileTypeMap associated with the data source
|
public FileDataSource(File file)
public FileDataSource(String name)
public InputStream getInputStream() throws IOException
getInputStream
in interface DataSource
IOException
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface DataSource
IOException
public String getContentType()
getContentType
in interface DataSource
public String getName()
getName
in interface DataSource
public File getFile()
public void setFileTypeMap(FileTypeMap map)
Copyright © 2013. All rights reserved.