On Tue, 2011-08-09 at 13:26 -0500, Jon Brisbin wrote:
> I can't figure out how I need to adapt the various Producer/Consumer 
> components to do a large file upload . I do not have the file on the local 
> filesystem and I obviously don't want to buffer the entire file in memory if 
> I want to do more than a single upload at a time. :) 
> 
> I'm looking into creating an async Producer to do this, but I'm wondering how 
> it works underneath. If I call write() on the ContentEncoder with a 
> ByteBuffer, does it flush the bytes down the channel so that they aren't in 
> memory any longer? I don't want to accumulate this stuff until the end of the 
> upload then send everything at once. I want to stream it to the server as I 
> get it. 
> 
> 
> Thanks! 
> 
> Jon Brisbin 
> http//jbrisbin.com 
> 
> 

Jon,

Have you looked at the ZeroCopyPost / ZeroCopyPut producers? They are
precisely meant for efficient (zero copy) file transfers.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to