Suf wrote:

> Hi there,
> 
> Just wondering, wouldn't that be more suitable for a codec 
> implementation?


The problem is that Mina primarily talks in ByteBuffers. ByteBuffers are
written, ByteBuffers are read.
This is perfect for 99.99% of uses. 
However, sometimes you need access to the "guts" or "lower levels" (in
NIOs case, this means the channels).

The reason FileChannel#transferTo is good is that the program does not
(in theory) have to load the bytes of the file in to user space, and
then copy them back out to the destination (Of course, this depends on
the JVM implementation....).

However, I don't think such low level shenanigans are possible in Mina
at the moment - meaning - yeah - I'd currently have to stream the
contents in to user space.

> Suf



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

Reply via email to