public class CachedFileDataSource extends 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, setFileTypeMapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInputStream, getName, getOutputStreampublic CachedFileDataSource(File file)
public String getContentType()
getContentType in interface DataSourcegetContentType in class 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 © 2004–2024 The Apache Software Foundation. All rights reserved.