/** * Emits the smaller buffer as character tokens. * * @throws SAXException * if the token handler threw */ private void emitStrBuf() throws SAXException { if (strBufLen > 0) { tokenHandler.characters(strBuf, 0, strBufLen); } }
/** * Reads a byte from the data source. * * -1 means end. * @return * @throws IOException */ protected int read() throws IOException { return readable.readByte(); }
public boolean internalEncodingDeclaration(String internalCharset) throws SAXException { if (encodingDeclarationHandler != null) { return encodingDeclarationHandler.internalEncodingDeclaration(internalCharset); } return false; }
/** * @throws SAXException * @see nu.validator.htmlparser.impl.Tokenizer#transition(int, int, boolean, * int) */ @Override protected int transition(int from, int to, boolean reconsume, int pos) throws SAXException { if (transitionHandler != null) { transitionHandler.transition(from, to, reconsume, transitionBaseOffset + pos); } return to; }
private void emitDoctypeToken(int pos) throws SAXException { cstart = pos + 1; tokenHandler.doctype(doctypeName, publicIdentifier, systemIdentifier, forceQuirks); // It is OK and sufficient to release these here, since // there's no way out of the doctype states than through paths // that call this method. doctypeName = null; Portability.releaseString(publicIdentifier); publicIdentifier = null; Portability.releaseString(systemIdentifier); systemIdentifier = null; }
public void start() throws SAXException { initializeWithoutStarting(); tokenHandler.startTokenization(this); // [NOCPP[ startErrorReporting(); // ]NOCPP] }
private void emitReplacementCharacter(@NoLength char[] buf, int pos) throws SAXException { flushChars(buf, pos); tokenHandler.zeroOriginatingReplacementCharacter(); cstart = pos + 1; }
/** * Reads a byte from the data source. * * -1 means end. * @return * @throws IOException */ protected int read() throws IOException { return readable.readByte(); }
private void emitOrAppendCharRefBuf(int returnState) throws SAXException { if ((returnState & DATA_AND_RCDATA_MASK) != 0) { appendCharRefBufToStrBuf(); } else { if (charRefBufLen > 0) { tokenHandler.characters(charRefBuf, 0, charRefBufLen); charRefBufLen = 0; } } }
public boolean internalEncodingDeclaration(String internalCharset) throws SAXException { if (encodingDeclarationHandler != null) { return encodingDeclarationHandler.internalEncodingDeclaration(internalCharset); } return false; }
/** * @throws SAXException * @see nu.validator.htmlparser.impl.Tokenizer#transition(int, int, boolean, * int) */ @Override protected int transition(int from, int to, boolean reconsume, int pos) throws SAXException { if (transitionHandler != null) { transitionHandler.transition(from, to, reconsume, transitionBaseOffset + pos); } return to; }
private void emitDoctypeToken(int pos) throws SAXException { cstart = pos + 1; tokenHandler.doctype(doctypeName, publicIdentifier, systemIdentifier, forceQuirks); // It is OK and sufficient to release these here, since // there's no way out of the doctype states than through paths // that call this method. doctypeName = null; Portability.releaseString(publicIdentifier); publicIdentifier = null; Portability.releaseString(systemIdentifier); systemIdentifier = null; }
public void start() throws SAXException { initializeWithoutStarting(); tokenHandler.startTokenization(this); // [NOCPP[ startErrorReporting(); // ]NOCPP] }
/** * Reads a byte from the data source. * * -1 means end. * @return * @throws IOException */ protected int read() throws IOException { return readable.readByte(); }
private void emitOrAppendCharRefBuf(int returnState) throws SAXException { if ((returnState & DATA_AND_RCDATA_MASK) != 0) { appendCharRefBufToStrBuf(); } else { if (charRefBufLen > 0) { tokenHandler.characters(charRefBuf, 0, charRefBufLen); charRefBufLen = 0; } } }
public boolean internalEncodingDeclaration(String internalCharset) throws SAXException { if (encodingDeclarationHandler != null) { return encodingDeclarationHandler.internalEncodingDeclaration(internalCharset); } return false; }
/** * @throws SAXException * @see nu.validator.htmlparser.impl.Tokenizer#transition(int, int, boolean, * int) */ @Override protected int transition(int from, int to, boolean reconsume, int pos) throws SAXException { if (transitionHandler != null) { transitionHandler.transition(from, to, reconsume, transitionBaseOffset + pos); } return to; }
@Override public int read() throws IOException { return source.readByte(); }
@Override public int read() throws IOException { return source.readByte(); }
@Override public int read() throws IOException { return source.readByte(); }