ByteBuffer bb = ByteBuffer.wrap(bytearray);
CharBuffer cb = CharBuffer.allocate(10);
bb.limit(4);
cb.limit(1); // Overflow should occur and is expected
result = decoder.decode(bb, cb, false);
if (result.isError()) {
errln("Error occurred while decoding: " + charsetName + " with error: " + result);
}