for (int i = 0; i < characters; i++) {
int value = readBits(bitsPerCharacter);
if (bitsPerCharacter < 8 && value == terminatingValue) {
int octetPosition = (i * bitsPerCharacter) >>> 3;
if (octetPosition != _octetBufferLength - 1) {
throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.alphabetIncorrectlyTerminated"));
}
break;
}
_charBuffer[_charBufferLength++] = restrictedAlphabet[value];
}