public class CachedFileDataSource extends javax.activation.FileDataSource implements SizeAwareDataSource
| Modifier and Type | Field and Description |
|---|---|
private static AttachmentCacheMonitor |
acm |
private java.lang.String |
cachedFileName |
(package private) java.lang.String |
contentType |
private static org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
CachedFileDataSource(java.io.File file) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getContentType() |
long |
getSize()
Get the size of the data source.
|
void |
setContentType(java.lang.String contentType) |
getFile, getInputStream, getName, getOutputStream, setFileTypeMapprivate static final org.apache.commons.logging.Log log
java.lang.String contentType
private static AttachmentCacheMonitor acm
private java.lang.String cachedFileName
public java.lang.String getContentType()
getContentType in interface javax.activation.DataSourcegetContentType in class javax.activation.FileDataSourcepublic void setContentType(java.lang.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 SizeAwareDataSource