On 08/07/2012 03:43 PM, Denis Gervalle wrote:
 From the current interface, I would use getContentOutputStream(), since
this would be the opposite of getContentInputStream(). This seems to me
very descriptive compare to a setContent() returning an OutputStream, since
a set is not supposed to return anything. I would use
setContent(OutputStream) if it was your goal, but this probably not what
you expect.

So, +1 for  getContentOutputStream()

+1 as well.

+0 for getOutputStream()
-0 for other previous proposals.

On Tue, Aug 7, 2012 at 9:01 PM, Caleb James DeLisle <
[email protected]> wrote:

getOutputStream() is not very descriptive although I suppose a good
javadoc comment would alleviate
the issue, I wrestled with the name myself and settled on setContent()
because it overloads the existing setContent() so it should be a bit
easier to remember.

If you guys like getOutputStream(), I'm happy enough with it.

Caleb


On 08/07/2012 03:24 AM, Thomas Mortagne wrote:
+1 for the idea in general but same comment than Marius

On Tue, Aug 7, 2012 at 7:35 AM, Marius Dumitru Florea
<[email protected]> wrote:
I understand the need and I'm +1 but I don't like the method name
(neither setContent() nor addContent()). WDYT about getOutputStream()
?

Thanks,
Marius

On Tue, Aug 7, 2012 at 12:06 AM, Caleb James DeLisle
<[email protected]> wrote:
Hi,
In the development of Cassandra attachments, I found I want to load an
attachment one chunk at a time and
write that chunk to a provided OutputStream, this is how I envision
next generation Hibernate attachments working too.

I would like to add to XWikiAttachmentContent:

public OutputStream addContent();

which returns an OutputStream that allows writing the attachment
content and upon close,
sets the attachment content as dirty and resets the size field.

WDYT?

Caleb


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

Reply via email to