private void parse(HwpStreamReader reader, XHTMLContentHandler xhtml)
            throws IOException, TikaException, SAXException {
        StringBuilder buf = new StringBuilder();
        TagInfo tag = new TagInfo();

        while (true) {
            if (!readTag(reader, tag)) {
                break;
            }

            if (HWPTAG_BEGIN + 51 == tag.id) {
                if (tag.length % 2 != 0) {
                    throw new IOException("Invalid block size");
                }
                if (tag.length > MAX_TAG_LENGTH) {
                    throw new TikaMemoryLimitException("Tags myst be smaller than " + MAX_TAG_LENGTH);
                }
                buf.setLength(0);
                writeParaText(reader, tag.length, buf);

                if (buf.length() > 0) {
                    buf.append('\n');

                    xhtml.startElement("p");
                    xhtml.characters(buf.toString());
                    xhtml.endElement("p");
                }
            } else {
                reader.skipFully(tag.length);
            }
        }
    }
extract characters from Section stream

@param reader
@param xhtml
@throws IOException
@throws SAXException
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-miscoffice-module/src/main/java/org/apache/tika/parser/hwp/HwpTextExtractorV5.java