code: public boolean canEncode(char c) {
          CharBuffer cb = CharBuffer.allocate(1);
          cb.put(c);
          cb.flip();
          return canEncode(cb);
      }
docs: Tells whether or not this encoder can encode the given character.
  
  <p> This method returns <tt>false</tt> if the given character is a
  surrogate character; such characters can be interpreted only when they
  are members of a pair consisting of a high surrogate followed by a low
  surrogate.  The {@link #canEncode(java.lang.CharSequence)
  canEncode(CharSequence)} method may be used to test whether or not a
  character sequence can be encoded.
  
  <p> This method may modify this encoder's state; it should therefore not
  be invoked if an <a href="#steps">encoding operation</a> is already in
  progress.
  
  <p> The default implementation of this method is not very efficient; it
  should generally be overridden to improve performance.  </p>
  
  @return  <tt>true</tt> if, and only if, this encoder can encode
  the given character
  
  @throws  IllegalStateException
  If an encoding operation is already in progress