public class FileReader extends AbstractResourceReader implements Serviceable, CacheableProcessingComponent
| Modifier and Type | Field and Description |
|---|---|
private MetadataAwareAmetysObject |
_ametysObject |
private BinaryMetadata |
_binary |
private String |
_path |
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
objectModel, out, parameters, resolver, source| Constructor and Description |
|---|
FileReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
doSetup(SourceResolver res,
Map objModel,
String src,
Parameters par)
|
protected MetadataAwareAmetysObject |
getAmetysObject()
Get the ametys object.
|
protected String |
getEncodedFilename()
If needed, returns the resource's name, properly encoded for using in a "Content-Disposition" HTTP header.
May be null, in which case the result of AbstractResourceReader.getFilename() is used instead. |
protected String |
getFilename()
Returns the resource's name.
|
protected InputStream |
getInputStream()
Returns the resource's
InputStream. |
Serializable |
getKey() |
long |
getLastModified() |
protected long |
getLength()
Returns the resource's length.
|
String |
getMimeType() |
SourceValidity |
getValidity() |
void |
recycle() |
void |
service(ServiceManager serviceManager) |
generate, getKeySuffix, processImage, setupsetOutputStream, shouldSetContentLengthenableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected AmetysObjectResolver _resolver
private MetadataAwareAmetysObject _ametysObject
private BinaryMetadata _binary
public FileReader()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void doSetup(SourceResolver res, Map objModel, String src, Parameters par) throws ProcessingException, IOException
AbstractResourceReaderAbstractResourceReader.setup(SourceResolver, Map, String, Parameters). This method should be implemented by subclasses to retrieve the actual resource.doSetup in class AbstractResourceReaderres - the SourceResolver.objModel - the Cocoon's object model.src - the source, as given by the sitemap.par - the parameters, as given by the sitemap.ProcessingException - if an error occurs while processing the resource.IOException - if an error occurs while accessing the resource.protected MetadataAwareAmetysObject getAmetysObject() throws ProcessingException
ProcessingException - if the information provided was insufficient to resolve an object.protected InputStream getInputStream()
AbstractResourceReaderInputStream.getInputStream in class AbstractResourceReaderInputStream.protected String getFilename()
AbstractResourceReadergetFilename in class AbstractResourceReaderprotected String getEncodedFilename()
AbstractResourceReaderAbstractResourceReader.getFilename() is used instead.getEncodedFilename in class AbstractResourceReaderprotected long getLength()
AbstractResourceReadergetLength in class AbstractResourceReaderpublic Serializable getKey()
getKey in interface CacheableProcessingComponentpublic SourceValidity getValidity()
getValidity in interface CacheableProcessingComponentpublic long getLastModified()
getLastModified in interface ReadergetLastModified in class AbstractReaderpublic String getMimeType()
getMimeType in interface SitemapOutputComponentgetMimeType in class AbstractReaderpublic void recycle()
recycle in interface Recyclablerecycle in class AbstractReader