public class UploadReader extends ServiceableReader
Reader
for generating binary output of previously
uploaded file.Modifier and Type | Field and Description |
---|---|
private Collection<String> |
_allowedFormats |
private CurrentUserProvider |
_currentUserProvider |
private int |
_height |
private int |
_maxHeight |
private int |
_maxWidth |
private boolean |
_readForDownload |
private Upload |
_upload |
private UploadManager |
_uploadManager |
private int |
_width |
manager
objectModel, out, parameters, resolver, source
Constructor and Description |
---|
UploadReader() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
_isImage()
Determines if the file is an image
|
void |
generate() |
long |
getLastModified() |
String |
getMimeType() |
void |
recycle() |
void |
service(ServiceManager serviceManager) |
void |
setup(SourceResolver res,
Map objModel,
String src,
Parameters par) |
setOutputStream, shouldSetContentLength
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private CurrentUserProvider _currentUserProvider
private UploadManager _uploadManager
private int _width
private int _height
private int _maxWidth
private int _maxHeight
private boolean _readForDownload
private final Collection<String> _allowedFormats
public UploadReader()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableReader
ServiceException
public void recycle()
recycle
in interface Recyclable
recycle
in class AbstractReader
public void setup(SourceResolver res, Map objModel, String src, Parameters par) throws ProcessingException, SAXException, IOException
setup
in interface SitemapModelComponent
setup
in class AbstractReader
ProcessingException
SAXException
IOException
public long getLastModified()
getLastModified
in interface Reader
getLastModified
in class AbstractReader
public String getMimeType()
getMimeType
in interface SitemapOutputComponent
getMimeType
in class AbstractReader
public void generate() throws IOException, SAXException, ProcessingException
protected boolean _isImage()
true
if file is a image