ByteBuffer has its position set correctly after encoding.