_characterContentChunkTable.add(_characters, _characters.length);
}
}
protected final void processAIIEncodingAlgorithm(QualifiedName name, boolean addToTable) throws FastInfosetException, IOException {
EncodingAlgorithm ea = null;
String URI = null;
if (_identifier >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START) {
URI = _v.encodingAlgorithm.get(_identifier - EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START);
if (URI == null) {
throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.URINotPresent", new Object[]{Integer.valueOf(_identifier)}));
} else if (_registeredEncodingAlgorithms != null) {
ea = (EncodingAlgorithm)_registeredEncodingAlgorithms.get(URI);
}
} else if (_identifier >= EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END) {
if (_identifier == EncodingAlgorithmIndexes.CDATA) {
throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.CDATAAlgorithmNotSupported"));
}
// Reserved built-in algorithms for future use
// TODO should use sax property to decide if event will be
// reported, allows for support through handler if required.
throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.identifiers10to31Reserved"));
} else {
ea = BuiltInEncodingAlgorithmFactory.getAlgorithm(_identifier);
}
Object algorithmData;
if (ea != null) {
algorithmData = ea.decodeFromBytes(_octetBuffer, _octetBufferStart,
_octetBufferLength);
} else {
final byte[] data = new byte[_octetBufferLength];
System.arraycopy(_octetBuffer, _octetBufferStart, data, 0,
_octetBufferLength);