private void ensureState() throws SAXException {
        if (state == 2) {
            try {
                w.write("public static void emit(org.xml.sax.ContentHandler contentHandler) throws org.xml.sax.SAXException {\n");
                writeStart();
            } catch (IOException e) {
                throw new SAXException(e);
            }
            state = 3;
        } else if (state != 3) {
            throw new SAXException("Illegal state.");
        }
    }
@see org.xml.sax.ContentHandler#skippedEntity(java.lang.String)
src/nu/validator/xml/SaxCompiler.java