hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Brisbin <...@jbrisbin.com>
Subject Using async HTTP client to upload 1GB entity
Date Tue, 09 Aug 2011 18:26:28 GMT
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 



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message