[gatein-issues] [JBoss JIRA] (GTNPORTAL-2722) Improve design of DownloadResource
Minh Hoang TO (JIRA)
jira-events at lists.jboss.org
Thu Apr 18 04:27:53 EDT 2013
[ https://issues.jboss.org/browse/GTNPORTAL-2722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Minh Hoang TO updated GTNPORTAL-2722:
-------------------------------------
Labels: done portal-s70 (was: portal-s70)
> Improve design of DownloadResource
> ----------------------------------
>
> Key: GTNPORTAL-2722
> URL: https://issues.jboss.org/browse/GTNPORTAL-2722
> Project: GateIn Portal
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Reporter: Minh Hoang TO
> Assignee: Minh Hoang TO
> Labels: done, portal-s70
> Original Estimate: 3 days, 4 hours
> Remaining Estimate: 3 days, 4 hours
>
> For the moment, DownloadResource is designed as a wrapper of InputStream.
> {code:java}
> public abstract class DownloadResource
> {
> public abstract InputStream getInputStream() throws IOException;
> }
> {code}
> This design is bad as the code of DownloadService has to care about IO handling on DownloadResource. That work should be done on DownloadResource creator 's side.
> It is better with
> {code:java}
> public abstract class DownloadResource
> {
> public abstract void write(OutputStream out) throws IOException;
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the gatein-issues
mailing list