Fix #1236: Implement java.io.PrintWriter.

http://stackoverflow.com/a/215505/1829647