jmeter.apache.org has an internal http proxy which it uses for recording page hits. It is a fairly decent proxy and has fairly wide support and thus serves as a decent example. The code although tied to JMeter is a good learning aid.
A second library that might help you is HTTPComponents again on apache (http://hc.apache.org/) which contains a client and core HTTP support set of libraries which can be used to write a reasonable proxy at least from the client side.
In Java 1.6 there is also a com.sun.net.httpserver HTTPServer class which is outside of the normal API but it can allow for quite simple servers to be written, and combined with something like HTTP Components for talking to the clients could be used to put together a simple proxy.