How to open a writer against the client

2008-12-21 Thread Ido Blutman
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 increas

Re: How to open a writer against the client

2008-12-22 Thread Stephan Koops
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,

Re: How to open a writer against the client

2008-12-22 Thread Thierry Boileau
Hello Ido, what kind of representation were you using? a FileRepresentation? best regards, Thierry Boileau > 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