static boolean isXmlDeclarationStart(final char[] buffer, final int offset, final int maxi) {
        // No upper case allowed in XML Declaration. XML is case-sensitive!!
        return ((maxi - offset > 5) && 
                    buffer[offset] == '<' &&
                    buffer[offset + 1] == '?' &&
                    buffer[offset + 2] == 'x' && 
                    buffer[offset + 3] == 'm' && 
                    buffer[offset + 4] == 'l' && 
                    (Character.isWhitespace(buffer[offset + 5]) || 
                            ((maxi - offset > 6) && buffer[offset + 5] == '?' && buffer[offset + 6] == '>')));
    }