Hi Ido,

you could subclass the clas org.restlet.resource.OutputRepresentation 
and implement the method write(OutputStream). In this method you put 
your data into the OutputStream.
If you want to copy from another InputStream, you could use the method 
org.restlet.util.ByteUtil.write(InputStream, OutputStream), which does 
exaclty this.

best regards
   Stephan

Ido Blutman schrieb:
> Hello Everyone,
>
> I have a problem: I need to send as a response to the client a big XML file - 
> can be even more than 30MB.
>
> What I need, I suppose, is to open an output writer and send the xml file in 
> chunks (if I try to read it all to the memory I get OutOfMemoryError and even 
> if I will increase the vm memory it won't be a solution for many users in the 
> same time).
>
> Any advice how can I do it? for now I use the StringRepresentation but it 
> doesn't work.
>
> Thanks,
>
> Ido
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=989573

Reply via email to