示例#1
0
 protected byte[] doDecoding(byte[] bytes) throws DecoderException {
   if (bytes == null) {
     return null;
   }
   boolean hasUnderscores = false;
   for (byte b : bytes) {
     if (b == 95) {
       hasUnderscores = true;
       break;
     }
   }
   if (hasUnderscores) {
     byte[] tmp = new byte[bytes.length];
     for (int i = 0; i < bytes.length; i++) {
       byte b = bytes[i];
       if (b != 95) {
         tmp[i] = b;
       } else {
         tmp[i] = 32;
       }
     }
     return QuotedPrintableCodec.decodeQuotedPrintable(tmp);
   }
   return QuotedPrintableCodec.decodeQuotedPrintable(bytes);
 }