oops, hit returns by mistake :) So let's continue the message :
- the String is totally decoded. - the String is pending, as the last byte is not an ASCII char, and we need to get one more byte to decode a char. In the second state, you will receive an IllegalStateException if you call the decoder a second time, unless you reset the CharsetDecoder. Now, what would be very interesting is if you can provide a very simple test case where we can reproduce the error you get. I'm a little bit concerned about how well MINA will handle cross buffers multi-bytes chars, and I would like to see if it works correctly ih this case. Thanks ! PS : A stack trace could also help, and a hex dump of the buffer you are trying to decode. On Mon, Sep 8, 2008 at 12:22 AM, Emmanuel Lecharny <[EMAIL PROTECTED]> wrote: > Hi, > > the CharsetDecoder will try to decode as much chars as it can from the > ByteBuffer. When it reach the end of the buffer, you will have nothing > more to decode. Here, you have 2 cases : > - the String is totally decoded. > - the String is pending, as the la > > The exception you get (current-state=CODING_END) > > On Mon, Sep 8, 2008 at 12:00 AM, jan de vries <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I'm pretty new to MINA so this might be a stupid remark.. >> Anyway, i did use a search on the mailing list but i did find out if this is >> a real bug or not. >> If i call >> str = ds.cacheBuf.getString(decoder); >> twice (with or without flip() ) i always get an exception. I think getString >> releases the buffer or something >> but after calling getString i can't use it anymore. I also used duplicate >> and then a getString on the duplicate, >> but this doesn't help either. Can somebody test please if he/she can use >> getString twice? If it does work with >> others ill investigate it some more (and give more details), but i just >> couldn't get it to work.... >> >> Im using mina 1.1.7 >> >> the exception im getting is java.lang.IllegalStateException: Current state = >> CODING_END, new state = CODING. >> I read some mailinglist messages about this, but i'm not familiar enough >> with mina to fully comprehend them all so >> i hope i'm not asking something which has already been answered. >> >> Regards >> >> > > > > -- > Regards, > Cordialement, > Emmanuel Lécharny > www.iktek.com > -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
