Wikipedia:WikiProject edit counters/Java Sandbox

Also, have a look at WikiProject edit counters/Flcelloguy's Tool/Versions to check if you have the most recent code.

Output
Loading -- Bytes loaded: 33 Bytes loaded: 32 -- DONE! Bytes read: 33; String length: 33 $globalConfigs:

killBit = false; Loading -- Bytes loaded: 2368 Bytes loaded: 5224 Bytes loaded: 6652 Bytes loaded: 8080 Bytes loaded: 9508 Bytes loaded: 11898 Bytes loaded: 13326 Bytes loaded: 14754 Bytes loaded: 15994 Bytes loaded: 17422 Bytes loaded: 18850 Bytes loaded: 20278 Bytes loaded: 21706 Bytes loaded: 24186 Bytes loaded: 25614 Bytes loaded: 27042 Bytes loaded: 28282 Bytes loaded: 31138 Bytes loaded: 33994 Bytes loaded: 35422 Bytes loaded: 36850 Bytes loaded: 39706 Bytes loaded: 40570 Bytes loaded: 41998 Bytes loaded: 44854 Bytes loaded: 46282 Bytes loaded: 47710 Bytes loaded: 49080 Bytes loaded: 49079 -- DONE! Bytes read: 49080; String length: 49080 Loading http://en.wikipedia.org/ from cache at time Thu Apr 13 00:34:27 EDT 2006 -ms until cache expired: 599953

Output
Loading -- Bytes loaded: 33 Bytes loaded: 32 -- DONE! Bytes read: 33; String length: 33 $globalConfigs:

killBit = false; Loading -- Bytes loaded: 1368 Bytes loaded: 1367 -- DONE! Bytes read: 1368; String length: 1368 -2 Media -1 íŠ¹ìˆ˜ê¸°ëŠ¥ 0 Main 1 í† ë¡ 2 ì‚¬ìš©ìž? 3 ì‚¬ìš©ìž?í† ë¡ 4 ìœ„í‚¤ë°±ê³¼ 5 ìœ„í‚¤ë°±ê³¼í† ë¡ 6 ê·¸ë¦¼ 7 ê·¸ë¦¼í† ë¡ 12 ë?„ì›€ë§? 13 ë?„ì›€ë§?í† ë¡ 14 ë¶„ë¥˜ 15 ë¶„ë¥˜í† ë¡ 8 MediaWiki 9 MediaWiki talk 10 Template 11 Template talk Loading -- Bytes loaded: 1883 Bytes loaded: 1882 -- DONE! Bytes read: 1883; String length: 1883 -2 Media -1 Special 0 Main 1 Talk 2 User 3 User talk 4 Wikipedia 5 Wikipedia talk 6 Image 7 Image talk 8 MediaWiki 9 MediaWiki talk 10 Template 11 Template talk 12 Help 13 Help talk 14 Category 15 Category talk 100 Portal 101 Portal talk The ko wiki does not have the equivalent of English Wikipedia namespace: Portal The ko wiki does not have the equivalent of English Wikipedia namespace: Portal talk

Sample on-screen output
Titoxd at 13:29, 13 April 2006 (UTC) Statistics for: Titoxd - Total: 16323 - Main: 5677 Talk: 648 User: 1088 User talk: 4252 Wikipedia: 3399 Wikipedia talk: 795 Image: 40 Image talk: 2 MediaWiki: 35 MediaWiki talk: 10 Template: 216 Template talk: 59 Help: 7 Category: 18 Category talk: 1 Portal: 61 Portal talk: 15 --- Total edits: 16323 Minor edits: 6352 Edits with edit summary: 16278 Edits with manual edit summary: 15916 Percent minor edits: 38.91% * Percent edit summary use: 99.72% * Percent manual edit summary use: 97.5% * --- ---
 * - percentages are rounded down to the nearest hundredth.

PurgeContribs.java
object that contains the raw HTML for the Contributions line * @return String with the relative URL of the link if the link is available, null if it is not */	public static String getNextDiffs(String inLine) throws IOException {		// if no such user, it would have been caught already if (inLine.contains(" No changes were found matching these criteria.")) throw new IOException(StatBundle.NO_EDITS); StringTokenizer midToken = new StringTokenizer(inLine,""); String midLine[] = new String[midToken.countTokens]; for (int i = 0; i < midLine.length; i++) {			midLine[i] = midToken.nextToken; }		StringTokenizer token = new StringTokenizer(midLine[5],"<>"); String tag = token.nextToken; String link = null; boolean diffObtained = false; //FIXME: Internationalize this function do {			if (tag.contains("href=\"/w/index.php?title=Special:Contributions&"))			{				if (tag.contains("limit=5000"))				{					if (token.nextToken.contains("Older"))						link = tag.split("\"")[1]; link = link.replace("&amp;","&"); diffObtained = true; }			}			if (token.hasMoreTokens) {				tag = token.nextToken; }			else {				diffObtained = true; }		} while (!diffObtained); return link; }	public static String getUsername(String line) throws IOException {		if (!line.contains("title=\"User:"))			throw new IOException(StatBundle.NO_SUCH_USER);

return line.substring(				line.indexOf("title=\"User:") + 12,				line.indexOf("\">", line.indexOf("title=\"User:")));	} }

Output
/w/index.php?title=Special:Contributions&offset=20060329014125&limit=5000&target=AySz88