decodeUtf8StringAsCharBuffer();
if (_charBuffer[0] == 'x' &&
_charBuffer[1] == 'm' &&
_charBuffer[2] == 'l') {
throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.prefixIllegal"));
}
final String s = (_stringInterning) ? new String(_charBuffer, 0, _charBufferLength).intern() :
new String(_charBuffer, 0, _charBufferLength);
_prefixIndex = _v.prefix.add(s);
return s;
}
case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_LENGTH_5:
{
_octetBufferLength = EncodingConstants.XMLNS_NAMESPACE_PREFIX_LENGTH;
decodeUtf8StringAsCharBuffer();
if (_charBuffer[0] == 'x' &&
_charBuffer[1] == 'm' &&
_charBuffer[2] == 'l' &&
_charBuffer[3] == 'n' &&
_charBuffer[4] == 's') {
throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.xmlns"));
}
final String s = (_stringInterning) ? new String(_charBuffer, 0, _charBufferLength).intern() :
new String(_charBuffer, 0, _charBufferLength);
_prefixIndex = _v.prefix.add(s);
return s;
}
case DecoderStateTables.ISTRING_SMALL_LENGTH:
case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_LENGTH_29:
case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_LENGTH_36:
{
_octetBufferLength = b + 1;
final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
_prefixIndex = _v.prefix.add(s);
return s;
}
case DecoderStateTables.ISTRING_MEDIUM_LENGTH:
{
_octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_SMALL_LIMIT;
final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
_prefixIndex = _v.prefix.add(s);
return s;
}
case DecoderStateTables.ISTRING_LARGE_LENGTH:
{
final int length = (read() << 24) |
(read() << 16) |
(read() << 8) |
read();
_octetBufferLength = length + EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_LIMIT;
final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
_prefixIndex = _v.prefix.add(s);
return s;
}
case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_INDEX_ZERO:
if (namespaceNamePresent) {
_prefixIndex = 0;
// Peak at next byte and check the index of the XML namespace name
if (DecoderStateTables.ISTRING_PREFIX_NAMESPACE(peek())
!= DecoderStateTables.ISTRING_PREFIX_NAMESPACE_INDEX_ZERO) {
throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.wrongNamespaceName"));
}
return EncodingConstants.XML_NAMESPACE_PREFIX;
} else {
throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.missingNamespaceName"));
}
case DecoderStateTables.ISTRING_INDEX_SMALL:
_prefixIndex = b & EncodingConstants.INTEGER_2ND_BIT_SMALL_MASK;
return _v.prefix._array[_prefixIndex - 1];
case DecoderStateTables.ISTRING_INDEX_MEDIUM:
_prefixIndex = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
+ EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
return _v.prefix._array[_prefixIndex - 1];
case DecoderStateTables.ISTRING_INDEX_LARGE:
_prefixIndex = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
+ EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
return _v.prefix._array[_prefixIndex - 1];
default:
throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingIdentifyingStringForPrefix"));
}
}