On Nov 22, 2007 3:51 AM, Frédéric Brégier <[EMAIL PROTECTED]> wrote: > Hi all, > I feel that the question I post inside my long previous mail should > be on a separate one, so here it is again. Sorry for the double post ! > > Just a question perhaps stupid : > I have the idea to perhaps use StreamWriteFilter or StreamIoHandler to > transfer some files > but with a protocol exchange before and after the file transfer (to verify > the access, the rules, > to make some pre or post operations, probably making an MD5 check of the > transfered file...). > I have look at the mailing list but I didn't find a good example of what > could be the best > but also I didn't understand how to "get" the file on the other side. > That is to say : I saw some code to send file (using StreamWF) but no on > receiving this file? > I'm surely missing something, obviously...
For now.. you can: 1) Use StreamIoHandler, which is not recommended because it makes MINA work like a blocking I/O server. However, it's fine as long as you limit the usage of the StreamIoHandler. 2) Create a chunk message so your decoder generate multiple chunks with begin and end mark. Please let me know if you have any better idea to deal with big files. :) Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
