Fix #1236: Implement java.io.PrintWriter.

Doesn't Java's `protected` translate to Scala's package protected?