michel-kraemer/bson4jackson — Issue #18: Trouble with Strings larger than 64k
Author: endasb
Created: 2012-01-14 18:09:37+00:00
State: open

It appears that by reusing the CharsetDecoder requires a reset at least when trying to handle strings that will require multiple calls to handle.

Caused by: java.lang.IllegalStateException: Current state = CODING_END, new state = CODING
at java.nio.charset.CharsetDecoder.throwIllegalStateException(CharsetDecoder.java:951)
at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:537)
at de.undercouch.bson4jackson.io.LittleEndianInputStream.readUTF(LittleEndianInputStream.java:311)
at de.undercouch.bson4jackson.io.LittleEndianInputStream.readUTF(LittleEndianInputStream.java:264)
at de.undercouch.bson4jackson.BsonParser.readString(BsonParser.java:506)
at de.undercouch.bson4jackson.BsonParser.nextToken(BsonParser.java:228)