How can I transmit a file in chunks of 512bytes where each chunk gets some framing bytes before transmitting? Any example or pseudo code is welcomed. I just cannot figure out how to get the filter-chaining correct.
What I have got so far: A "class MyFileRegion" which "implements FileRegion" and a "class MyFileRegionWriteFilter extends AbstractStreamWriteFilter<MyFileRegion>" which overwrites getMessageClass and getNextBuffer. This Filter is responsible for generating the data chunks and is the first filter in chain. Then I have a "MessageCodecFactory extends DemuxingProtocolCodecFactory" where I would like to add a message encoder which takes care of the additional framing bytes and gets set up like this: "super.addMessageEncoder(MyFileRegion.class, MyFileRegionEncoder.class);" The "class MyFileRegionEncoder implements MessageEncoder<MyFileRegion>" but it's encode-method is never called. The 512 byte-chunks do get send but without the framing-bytes. How must the chaining and the MessageEncoder be, so that it's encode-method gets called. -- View this message in context: http://apache-mina.10907.n7.nabble.com/FileRegionWriteFilter-again-tp39767.html Sent from the Apache MINA User Forum mailing list archive at Nabble.com.