[
https://issues.apache.org/jira/browse/TRINIDAD-1757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849534#action_12849534
]
Girish Kumar Balachandran commented on TRINIDAD-1757:
-----------------------------------------------------
I just walked thru the impl of
org.apache.myfaces.trinidadinternal.config.upload.UploadedFileImpl and it seems
that the code already handles multiple calls to getInputStream() method.
Basically the InputStream returned by this call is backed by either a byte
buffer or a file. Each call to getInputStream() just wraps a new
BufferedInputStream around byte buffer/file and returns it. Hence, this can
handle multiple calls without any issues. This makes this ER change much more
simple. Patch to follow soon...
> Allow (or support) decorator pattern for the UploadedFileProcessor
> ------------------------------------------------------------------
>
> Key: TRINIDAD-1757
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1757
> Project: MyFaces Trinidad
> Issue Type: Improvement
> Affects Versions: 1.2.13-core , 2.0.0-alpha-2
> Reporter: Matthias Weßendorf
>
> Currently it is only possible to replace the entire UploadedFileProcessor,
> with a custom one.
> A neat improvement (crap, this should not be a bug) would be supporting the
> decorator pattern.
> The tricky part is that we need a buffer inside of the implementation of the
> file
> that get's passed into the Processor.
> currently you can call only once the "getInputStream", so we need a buffer
> here
> (that works with the impl's writeFile()/getInputStream()):
> There are some ways for that.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.