I've just written myself a small app in java (1.4.2) and I’ve been looking at the http headers it sends. I’d like to be able to change the user agent but I can't find where this is set. I've looked through the source for java.net.URL and the classes it imports but I couldn't see it. I'd also like to be able to set the referrer string, but this isn't essential yet.
Any suggestions of where to look would be greatly appreciated.