CoderResult (final CharBuffer out) { if (myOutBuffer.length() != 0) { int remaining = out.remaining(); int outLen = Math.min(remaining, myOutBuffer.length()); out.append(myOutBuffer, 0, outLen); myOutBuffer.delete(0, outLen); if (myOutBuffer.length() != 0) return CoderResult.OVERFLOW; } return CoderResult.UNDERFLOW; }