Implement part of java.nio.{Byte,Char}Buffer.

These are required to implement Charset encoders and decoders.