code: public Charset getCharset() {
      if (bootstrapEvent != null) {
        return Charset.forName(bootstrapEvent.getDefaultCharsetName());
      } else {
        return Charset.defaultCharset();
      }
    }
docs: Return the {@link Charset} used to encode stream bytes from the slave.