return word;
if (!word.startsWith("=?")) { throw new ParseException("Invalid RFC 2047 encoded-word: " + word); }  int charsetPos = word.indexOf('?', 2); if (charsetPos == -1) { throw new ParseException("Missing charset in RFC 2047 encoded-word: " + word); }   String charset = word.substring(2, charsetPos).toLowerCase();   int encodingPos = word.indexOf('?', charsetPos + 1); if (encodingPos == -1) { throw new ParseException("Missing encoding in RFC 2047 encoded-word: " + word); }  String encoding = word.substring(charsetPos + 1, encodingPos);   int encodedTextPos = word.indexOf("?=", encodingPos + 1); if (encodedTextPos == -1) { throw new ParseException("Missing encoded text in RFC 2047 encoded-word: " + word); }  String encodedText = word.substring(encodingPos + 1, encodedTextPos);   if (encodedText.length() == 0) { return ""; }  try {  ByteArrayOutputStream out = new ByteArrayOutputStream(encodedText.length());  byte[] encodedData = encodedText.getBytes("US-ASCII");   if (encoding.equals("B")) { Base64.decode(encodedData, out); }  else if (encoding.equals("Q")) { QuotedPrintableEncoder dataEncoder = new QuotedPrintableEncoder(); dataEncoder.decodeWord(encodedData, out); } else { throw new UnsupportedEncodingException("Unknown RFC 2047 encoding: " + encoding); }  byte[] decodedData = out.toByteArray(); return new String(decodedData, javaCharset(charset)); } catch (IOException e) { throw new UnsupportedEncodingException("Invalid RFC 2047 encoding"); }
    public static String decodeWord(String word) throws ParseException, UnsupportedEncodingException {        // TODO - take account of encoding        return word;    }