On 10/15/2010 03:17 PM, Caleb James DeLisle wrote:
> This is just a small API change proposal. Since my implementation changes for 
> XWikiAttachment store
> the attachment content in a temp file rather than a byte array, there is no 
> need to require the user
> to provide the length of the provided stream and in many cases (upload for 
> instance) this number is
> very difficult to determine in advance.
>
> I propose we add:
> public void setContent(InputStream is) throws IOException
>
> In addition to the existing:
> public void setContent(InputStream is, int length) throws IOException
>
> WDYT?

+1. It should have been this way since the beginning. You could also 
deprecate the other method as well, and don't forget to update the 
javadoc for the older byte[] method.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to