public class CachedFileDataSource extends javax.activation.FileDataSource implements SizeAwareDataSource
| Constructor and Description |
|---|
CachedFileDataSource(File file) |
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType() |
long |
getSize()
Get the size of the data source.
|
void |
setContentType(String contentType) |
getFile, getInputStream, getName, getOutputStream, setFileTypeMappublic CachedFileDataSource(File file)
public String getContentType()
getContentType in interface javax.activation.DataSourcegetContentType in class javax.activation.FileDataSourcepublic void setContentType(String contentType)
public long getSize()
SizeAwareDataSourceDataSource.getInputStream() before reaching
the end of the stream. If the implementation is unable to determine the
size, it must return -1.getSize in interface SizeAwareDataSourceCopyright © The Apache Software Foundation. All Rights Reserved.