How about directly transfer thee file? In MINA, after call
session.write(file) , it will check whether the messsage you have written is
a file and use fileChannel.transfterTo() to transfer the file.



2009/3/3 Emmanuel Lecharny <[email protected]>

> Thomas Harning wrote:
>
>> On Mar 2, 2009, at 2:33 PM, Emmanuel Lecharny wrote:
>>
>>> You will create huge buffers. If your files are 2Gb big, it will suck up
>>> all your memory. Just split the file in small chunks, it works exactly the
>>> same way.
>>>
>> Would it?  I would think that the IO system would behave as a
>> memory-mapped file... paging data in as it needed it and out as it's done...
>>
> The internal buffers in MINA ate wrapped around ByteBuffer. This is what is
> transmitted ultimately.
>
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>

Reply via email to