code: public static CharsetEncoder encoder(Charset charset, CodingErrorAction malformedInputAction,
                                           CodingErrorAction unmappableCharacterAction) {
          checkNotNull(charset, "charset");
          CharsetEncoder e = charset.newEncoder();
          e.onMalformedInput(malformedInputAction).onUnmappableCharacter(unmappableCharacterAction);
          return e;
      }
docs: Returns a new {@link CharsetEncoder} for the {@link Charset} with specified error actions.
  
  @param charset The specified charset
  @param malformedInputAction The encoder's action for malformed-input errors
  @param unmappableCharacterAction The encoder's action for unmappable-character errors
  @return The encoder for the specified {@code charset}