*  @param text some wikitext to compare against
         *  @return a difference between oldid or text
         *  @throws IOException if a network error occurs
         *  @since 0.21
         */
        protected String diff(long oldid, String text) throws IOException
        {
            // send via POST
            StringBuilder temp = new StringBuilder("prop=revisions&revids=");
            temp.append(revid);
            // no switch for longs? WTF?
            if (oldid == NEXT_REVISION)
                temp.append("&rvdiffto=next");
            else if (oldid == CURRENT_REVISION)
                temp.append("&rvdiffto=cur");
            else if (oldid == PREVIOUS_REVISION)
                temp.append("&rvdiffto=prev");
            else if (oldid == 0L)
            {
                temp.append("&rvdifftotext=");
                temp.append(text);
            }
            else
            {
                temp.append("&rvdiffto=");
                temp.append(oldid);
            }
            String line = post(query, temp.toString(), "Revision.diff");
            // strip extraneous information
            int a = line.indexOf("<diff");
            a = line.indexOf(">", a) + 1;
            int b = line.indexOf("</diff>", a);
            return decode(line.substring(a, b));
        }