Retrieving GMail Atom feed with Rome

Those of you with a GMail account might like this. It retrieves the GMail Atom feed of you inbox status using the Rome Syndication libraries (Grab Rome 0.4 and Rome Fetcher 0.4 from http://rome.dev.java.net). You'll need to edit the BasicAuthenticator class to set your username and password. Gmail currently doesn't support conditional-gets or ETags, so … Continue reading Retrieving GMail Atom feed with Rome

JDK1.5: java.lang.instrument

The java.lang.instrument package allows a programmer to modify classfiles as they are loaded. No API for doing the modifications is supplied, but you can use ASM or BCEL etc to do that. This example prints out class names as they are loaded. package inst; import java.lang.instrument.ClassFileTransformer; import java.lang.instrument.IllegalClassFormatException; import java.lang.instrument.Instrumentation; public class Instrument { public … Continue reading JDK1.5: java.lang.instrument

1.5 Million Words in JavaBlogs?

The 1.5 million “words” I claimed JavaBlogs has needs to be clarified slightly. They are “words” as defined by running String.split(“\\W”) on all the posts archived. The [\W] regular expression is defined as a “A non-word character” – any character that is not in “a-zA-Z_0-9”. For normal english sentences from a book that is probably … Continue reading 1.5 Million Words in JavaBlogs?