/** * The smaller buffer as a String. Currently only used for error reporting. * * <p> * C++ memory note: The return value must be released. * * @return the smaller buffer as a string */ protected String strBufToString() { return Portability.newStringFromBuffer(strBuf, 0, strBufLen); }
/** * The larger buffer as a string. * * <p> * C++ memory note: The return value must be released. * * @return the larger buffer as a string */ private String longStrBufToString() { return Portability.newStringFromBuffer(longStrBuf, 0, longStrBufLen); }
/** * Attempts to extract a charset name from the accumulation buffer. * @return <code>true</code> if successful * @throws SAXException */ private void handleAttributeValue() throws SAXException { if (metaState != A) { return; } if (contentIndex == CONTENT.length && content == null) { content = Portability.newStringFromBuffer(strBuf, 0, strBufLen); return; } if (charsetIndex == CHARSET.length && charset == null) { charset = Portability.newStringFromBuffer(strBuf, 0, strBufLen); return; } if (httpEquivIndex == HTTP_EQUIV.length && httpEquivState == HTTP_EQUIV_NOT_SEEN) { httpEquivState = (contentTypeIndex == CONTENT_TYPE.length) ? HTTP_EQUIV_CONTENT_TYPE : HTTP_EQUIV_OTHER; return; } }
/** * Attempts to extract a charset name from the accumulation buffer. * @return <code>true</code> if successful * @throws SAXException */ private void handleAttributeValue() throws SAXException { if (metaState != A) { return; } if (contentIndex == CONTENT.length && content == null) { content = Portability.newStringFromBuffer(strBuf, 0, strBufLen // CPPONLY: , treeBuilder, false ); return; } if (charsetIndex == CHARSET.length && charset == null) { charset = Portability.newStringFromBuffer(strBuf, 0, strBufLen // CPPONLY: , treeBuilder, false ); return; } if (httpEquivIndex == HTTP_EQUIV.length && httpEquivState == HTTP_EQUIV_NOT_SEEN) { httpEquivState = (contentTypeIndex == CONTENT_TYPE.length) ? HTTP_EQUIV_CONTENT_TYPE : HTTP_EQUIV_OTHER; return; } }
/** * Attempts to extract a charset name from the accumulation buffer. * @return <code>true</code> if successful * @throws SAXException */ private void handleAttributeValue() throws SAXException { if (metaState != A) { return; } if (contentIndex == CONTENT.length && content == null) { content = Portability.newStringFromBuffer(strBuf, 0, strBufLen // CPPONLY: , treeBuilder, false ); return; } if (charsetIndex == CHARSET.length && charset == null) { charset = Portability.newStringFromBuffer(strBuf, 0, strBufLen // CPPONLY: , treeBuilder, false ); return; } if (httpEquivIndex == HTTP_EQUIV.length && httpEquivState == HTTP_EQUIV_NOT_SEEN) { httpEquivState = (contentTypeIndex == CONTENT_TYPE.length) ? HTTP_EQUIV_CONTENT_TYPE : HTTP_EQUIV_OTHER; return; } }
/** * The buffer as a String. Currently only used for error reporting. * * <p> * C++ memory note: The return value must be released. * * @return the buffer as a string */ protected String strBufToString() { String str = Portability.newStringFromBuffer(strBuf, 0, strBufLen // CPPONLY: , tokenHandler, !newAttributesEachTime && attributeName == AttributeName.CLASS ); clearStrBufAfterUse(); return str; }
/** * The buffer as a String. Currently only used for error reporting. * * <p> * C++ memory note: The return value must be released. * * @return the buffer as a string */ protected String strBufToString() { String str = Portability.newStringFromBuffer(strBuf, 0, strBufLen // CPPONLY: , tokenHandler, !newAttributesEachTime && attributeName == AttributeName.CLASS ); clearStrBufAfterUse(); return str; }
end = buffer.length; charset = Portability.newStringFromBuffer(buffer, start, end - start
end = buffer.length; charset = Portability.newStringFromBuffer(buffer, start, end - start);
return Portability.newStringFromBuffer(buffer, start, end - start