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, setFileTypeMap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputStream, getName, getOutputStream
public CachedFileDataSource(File file)
public String getContentType()
getContentType
in interface DataSource
getContentType
in class FileDataSource
public void setContentType(String contentType)
public long getSize()
SizeAwareDataSource
DataSource.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
Copyright © 2004–2023 The Apache Software Foundation. All rights reserved.