@Test public void testEncodeEncodedWord() throws Exception { Assert.assertEquals("=?US-ASCII?Q??=", EncoderUtil.encodeEncodedWord("", Usage.TEXT_TOKEN, 0, null, Encoding.Q)); Assert.assertEquals("=?US-ASCII?Q?testing_123?=", EncoderUtil .encodeEncodedWord("testing 123", Usage.TEXT_TOKEN, 0, null, Encoding.Q)); Assert.assertEquals("=?US-ASCII?B?dGVzdGluZyAxMjM=?=", EncoderUtil .encodeEncodedWord("testing 123", Usage.TEXT_TOKEN, 0, null, Encoding.B)); Assert.assertEquals("=?windows-1252?Q?100_=80?=", EncoderUtil .encodeEncodedWord("100 \u20ac", Usage.TEXT_TOKEN, 0, Charset .forName("Cp1252"), Encoding.Q)); Assert.assertEquals("=?windows-1252?B?MTAwIIA=?=", EncoderUtil .encodeEncodedWord("100 \u20ac", Usage.TEXT_TOKEN, 0, Charset .forName("Cp1252"), Encoding.B)); }
public static String encodeEncodedWord(String text, Usage usage) { return encodeEncodedWord(text, usage, 0, null, null); }
EncoderUtil { public static String encodeEncodedWord(String text, Usage usage) { return encodeEncodedWord(text, usage, 0, null, null); } }
EncoderUtil { public static String encodeEncodedWord(String text, Usage usage) { return encodeEncodedWord(text, usage, 0, null, null); } private  EncoderUtil(); }
EncoderUtil { public static String encodeEncodedWord(String text, Usage usage) { return encodeEncodedWord(text, usage, 0, null, null); } private  EncoderUtil(); static String encodeAddressDisplayName(String displayName); static String encodeAddressLocalPart(String localPart); static String encodeHeaderParameter(String name, String value); static String encodeIfNecessary(String text, Usage usage,
            int usedCharacters); static boolean hasToBeEncoded(String text, int usedCharacters); static String encodeEncodedWord(String text, Usage usage); static String encodeEncodedWord(String text, Usage usage,
            int usedCharacters); static String encodeEncodedWord(String text, Usage usage,
            int usedCharacters, Charset charset, Encoding encoding); static String encodeB(byte[] bytes); static String encodeQ(byte[] bytes, Usage usage); static void encodeQBinary(final InputStream in, final OutputStream out); static void encodeQ(final InputStream in, final OutputStream out); static void encodeB(final InputStream in, final OutputStream out); static boolean isToken(String str); }
EncoderUtil { public static String encodeEncodedWord(String text, Usage usage) { return encodeEncodedWord(text, usage, 0, null, null); } private  EncoderUtil(); static String encodeAddressDisplayName(String displayName); static String encodeAddressLocalPart(String localPart); static String encodeHeaderParameter(String name, String value); static String encodeIfNecessary(String text, Usage usage,
            int usedCharacters); static boolean hasToBeEncoded(String text, int usedCharacters); static String encodeEncodedWord(String text, Usage usage); static String encodeEncodedWord(String text, Usage usage,
            int usedCharacters); static String encodeEncodedWord(String text, Usage usage,
            int usedCharacters, Charset charset, Encoding encoding); static String encodeB(byte[] bytes); static String encodeQ(byte[] bytes, Usage usage); static void encodeQBinary(final InputStream in, final OutputStream out); static void encodeQ(final InputStream in, final OutputStream out); static void encodeB(final InputStream in, final OutputStream out); static boolean isToken(String str);  }