Lines Matching defs:body
102 * RFC 2047) found in a header field body.
118 * RFC 2047) found in a header field body.
153 * @param body the string to decode.
156 public static String decodeEncodedWords(String body) {
160 if (body.indexOf("=?") == -1) {
161 return body;
170 int begin = body.indexOf("=?", previousEnd);
178 int qm1 = body.indexOf('?', begin + 2);
182 int qm2 = body.indexOf('?', qm1 + 1);
186 int end = body.indexOf("?=", qm2 + 1);
192 String sep = body.substring(previousEnd, begin);
194 String decoded = decodeEncodedWord(body, begin, end);
197 sb.append(body.substring(begin, end));
210 return body;
212 sb.append(body.substring(previousEnd));
216 // return null on error. Begin is index of '=?' in body.
217 public static String decodeEncodedWord(String body, int begin, int end) {
218 // Skip the '?=' chars in body and scan forward from there for next '?'
219 int qm1 = body.indexOf('?', begin + 2);
223 int qm2 = body.indexOf('?', qm1 + 1);
227 String mimeCharset = body.substring(begin + 2, qm1);
228 String encoding = body.substring(qm1 + 1, qm2);
229 String encodedText = body.substring(qm2 + 1, end - 2);
235 + body.substring(begin, end) + "' doesn't have a "
243 + "' in encoded word '" + body.substring(begin, end)
252 + body.substring(begin, end) + "'");
265 + body.substring(begin, end) + "'");
273 + body.substring(begin, end) + "'", e);
279 + body.substring(begin, end) + "'", e);