Hi Vincent,

I found this page,
http://ostermiller.org/convert_java_outputstream_inputstream.html

On Sat, Aug 23, 2008 at 1:54 PM, Wang Ning <[EMAIL PROTECTED]> wrote:
> Hi Vincent,
>
> I think OutputStream convert(InputStream inputStream,
> OfficeDocumentType inputDocumentType, OfficeDocumentType
> outputDocumentType)  is not appropriate.
> The OutputStream is a place to write data to. I just can't get the
> data from the OutputStream.
> I think the OutputStream should be a special outputStream the user
> provide, so I have these to proposals for this interface:
> 1. ByteArrayOutputStream convert(InputStream inputStream,
> OfficeDocumentType inputDocumentType, OfficeDocumentType
> outputDocumentType)
> return type change to ByteArrayOutputStream. Then client can use
> ByteArrayOutputStream.toByteArray() to get the contents in
> OutputStream.
>
> 2.  void convert(InputStream inputStream, OfficeDocumentType
> inputDocumentType, OutputStream outputStream, OfficeDocumentType
> outputDocumentType)
> Client provide a output Target to store the contents. Example:
> ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
>  convert(inputStream, inputDocumentType, outputStream, outputDocumentType)
>
> WDYT?
> --
> Thanks
> Wang Ning
>



-- 
Thanks
Wang Ning
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to