code: void write(Object value) throws IOException {
      if (clientInputSerializer != null) {
        clientInputSerializer.serialize(value);
        return;
      }
  
      byte[] bval;
      int valSize;
      if (value instanceof BytesWritable) {
        BytesWritable val = (BytesWritable) value;
        bval = val.getBytes();
        valSize = val.getLength();
      } else if (value instanceof Text) {
        Text val = (Text) value;
        bval = val.getBytes();
        valSize = val.getLength();
      } else {
        String sval = value.toString();
        bval = sval.getBytes("UTF-8");
        valSize = bval.length;
      }
      clientOut_.write(bval, 0, valSize);
    }
docs: Write a value to the output stream using UTF-8 encoding
  @param value output value
  @throws IOException