code: public static String encodeEncodedWord(String text, Usage usage, int usedCharacters,
  			Charset charset, Encoding encoding) {
  		if (text == null)
  			throw new IllegalArgumentException();
  		if (usedCharacters < 0 || usedCharacters > MAX_USED_CHARACTERS)
  			throw new IllegalArgumentException();
  
  		if (charset == null)
  			charset = determineCharset(text);
  
  		String mimeCharset = charset.name(); // no canonical names needed
  		if (mimeCharset == null) {
  			// cannot happen if charset was originally null
  			throw new IllegalArgumentException("Unsupported charset");
  		}
  
  		byte[] bytes = encode(text, charset);
  
  		if (encoding == null)
  			encoding = determineEncoding(bytes, usage);
  
  		if (encoding == Encoding.B) {
  			String prefix = ENC_WORD_PREFIX + mimeCharset + "?B?";
  			return encodeB(prefix, text, usedCharacters, charset, bytes);
  		} else {
  			String prefix = ENC_WORD_PREFIX + mimeCharset + "?Q?";
  			return encodeQ(prefix, text, usage, usedCharacters, charset, bytes);
  		}
  	}
docs: Encodes the specified text into an encoded word or a sequence of encoded
  words separated by space. The text is separated into a sequence of encoded
  words if it does not fit in a single one.
  
  @param text
  text to encode.
  @param usage
  whether the encoded-word is to be used to replace a text token or
  a word entity (see RFC 822).
  @param usedCharacters
  number of characters already used up (
  <code>0 <= usedCharacters <= 50</code>).
  @param charset
  the Java charset that should be used to encode the specified
  string into a byte array. A suitable charset is detected
  automatically if this parameter is <code>null</code>.
  @param encoding
  the encoding to use for the encoded-word (either B or Q). A
  suitable encoding is automatically chosen if this parameter is
  <code>null</code>.
  @return the encoded word (or sequence of encoded words if the given text
  does not fit in a single encoded word).
  @see #hasToBeEncoded(String, int)