Hi Bryan,

We will document this case in the upcoming chapter 8 from "Restlet in Action". 

The easiest way to achieve this is to return an 
InputStream/InputRepresentation. When there is no more content available, the 
stream can return -1 to indicate the end (usual Java IO contract).

Best regards,
Jerome
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.o​rg
Noelios Technologies ~ http://www.noelios.com




-----Message d'origine-----
De : Bryan Hunt [mailto:[email protected]] 
Envoyé : lundi 19 juillet 2010 04:02
À : [email protected]
Objet : large datasets and chunked encoding?

It appears that chunked encoding is used so that you don't have to pre-buffer 
the data in the server and you can effectively stream it to the client.  This 
seems like a good way to return a large dataset.  I need to return a very large 
array of objects and it's not clear how to tell the client where an object 
begins and ends.  Also, is there a way for the client to cancel the transfer 
after some number of objects have been received?

Any Restlet examples or best practices would be appreciated.

Bryan

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

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

Reply via email to