285286287288289290291292293
} } handler.endElement("div"); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to end a page", e); } page.clear(); }
371372373374375376377378
assert !inParagraph; inParagraph = true; try { handler.startElement("p"); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to start a paragraph", e); } }
386387388389390391392393
assert inParagraph; inParagraph = false; try { handler.endElement("p"); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to end a paragraph", e); } }
395396397398399400401402403
@Override protected void writeString(String text) throws IOException { try { handler.characters(text); } catch (SAXException e) { throw new IOExceptionWithCause( "Unable to write a string: " + text, e); } }
405406407408409410411412413
@Override protected void writeCharacters(TextPosition text) throws IOException { try { handler.characters(text.getCharacter()); } catch (SAXException e) { throw new IOExceptionWithCause( "Unable to write a character: " + text.getCharacter(), e); } }
415416417418419420421422423
@Override protected void writeWordSeparator() throws IOException { try { handler.characters(getWordSeparator()); } catch (SAXException e) { throw new IOExceptionWithCause( "Unable to write a space character", e); } }
425426427428429430431432433
@Override protected void writeLineSeparator() throws IOException { try { handler.newline(); } catch (SAXException e) { throw new IOExceptionWithCause( "Unable to write a newline character", e); } }
100101102103104105106107
@Override protected void startDocument(PDDocument pdf) throws IOException { try { handler.startDocument(); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to start a document", e); } }
109110111112113114115116
@Override protected void endDocument(PDDocument pdf) throws IOException { try { handler.endDocument(); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to end a document", e); } }
119120121122123124125126
protected void startPage(PDPage page) throws IOException { try { handler.startElement("div", "class", "page"); handler.startElement("p"); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to start a page", e); } }