[xwiki-devs] [proposal] Add public void setContent(InputStream is) throws IOException to c.x.x.doc.XWikiAttachment.
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? Caleb
I forgot to mention, I also propose adding the same function to XWikiAttachmentContent On 10/15/2010 09:17 AM, 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?
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
big +1, Thanks, Marius On 10/15/2010 04: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?
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
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/
+1 On Fri, Oct 15, 2010 at 15:17, Caleb James DeLisle <[email protected]> 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?
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
done in r31889 On 10/15/2010 09:17 AM, 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?
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (4)
-
Caleb James DeLisle -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne