void read8bitEncodingDeclaration() throws java.lang.Exception
    {
        int ch;
        readBufferPos = readBufferLength = 0;

        while (true) {
            ch = is.read();
            readBuffer[readBufferLength++] = (char) ch;
            switch (ch) {
                case (int) '>':
                    return;
                case -1:
                    error(
                            "end of file before end of XML or encoding declaration.",
                            null, "?>");
                    return;
            }
            if (readBuffer.length == readBufferLength) {
                error("unfinished XML or encoding declaration", null, null);
            }
        }
    }