javax.activation
类 FileDataSource

java.lang.Object
  继承者 javax.activation.FileDataSource
所有已实现的接口:
DataSource

public class FileDataSource
extends Object
implements DataSource

版本:
$Rev: 467742 $ $Date: 2011/05/07 04:32:39 $

构造方法摘要
FileDataSource(File file)
          Creates a FileDataSource from a File object
FileDataSource(String name)
          Creates a FileDataSource from the specified path name
 
方法摘要
 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
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

FileDataSource

public FileDataSource(File file)
Creates a FileDataSource from a File object


FileDataSource

public FileDataSource(String name)
Creates a FileDataSource from the specified path name

方法详细信息

getInputStream

public InputStream getInputStream()
                           throws IOException
Return the InputStream obtained from the data source

指定者:
接口 DataSource 中的 getInputStream
抛出:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Return the OutputStream obtained from the data source

指定者:
接口 DataSource 中的 getOutputStream
抛出:
IOException

getContentType

public String getContentType()
Returns the content type of the data source

指定者:
接口 DataSource 中的 getContentType

getName

public String getName()
Returns the name of the data source object

指定者:
接口 DataSource 中的 getName

getFile

public File getFile()
Returns the data source file


setFileTypeMap

public void setFileTypeMap(FileTypeMap map)
Sets the FileTypeMap associated with the data source



Copyright © 2013. All Rights Reserved.