Lines Matching defs:word

92  * words start at the beginning of a whitespace separated word.  Some
93 * mailers incorrectly include encoded words in the middle of a word.
525 // Check if token is an 'encoded-word' ..
526 String word;
528 word = decodeWord(s);
529 // Yes, this IS an 'encoded-word'.
531 // if the previous word was also encoded, we
538 // This is NOT an 'encoded-word'.
539 word = s;
542 word = decodeInnerWords(word);
548 sb.append(word); // append the actual word
556 * Encode a RFC 822 "word" token into mail-safe form as per
576 public static String encodeWord(String word)
578 return encodeWord(word, null, null);
582 * Encode a RFC 822 "word" token into mail-safe form as per
603 public static String encodeWord(String word, String charset,
606 return encodeWord(word, charset, encoding, true);
611 * be true if a RFC 822 "word" token is being encoded and false if a
614 * encoding "word" tokens. (Sigh)
717 * an "encoded-word". If the parse fails, a ParseException is
724 * encoded-word as per RFC 2047.
731 if (!eword.startsWith("=?")) // not an encoded word
750 String word = eword.substring(start, pos);
753 // Extract the bytes from word
755 new ByteArrayInputStream(ASCIIUtility.getBytes(word));
767 // For b64 & q, size of decoded word <= size of word. So
808 * Look for encoded words within a word. The MIME spec doesn't
812 private static String decodeInnerWords(String word)
816 while ((i = word.indexOf("=?", start)) >= 0) {
817 buf.append(word.substring(start, i));
818 int end = word.indexOf("?=", i);
821 String s = word.substring(i, end + 2);
831 return word;
832 if (start < word.length())
833 buf.append(word.substring(start));
838 * A utility method to quote a word, if the word contains any
847 * @param word word to be quoted
849 * @return the possibly quoted word
853 public static String quote(String word, String specials) {
854 int len = word.length();
862 char c = word.charAt(i);
867 sb.append(word.substring(0, i));
870 char cc = word.charAt(j);
889 sb.append('"').append(word).append('"');
892 return word;