1 21 22 27 28 package com.sun.mail.util; 29 30 import java.io.*; 31 32 38 39 public class QDecoderStream extends QPDecoderStream { 40 41 45 public QDecoderStream(InputStream in) { 46 super(in); 47 } 48 49 61 public int read() throws IOException { 62 int c = in.read(); 63 64 if (c == '_') return ' '; 66 else if (c == '=') { 67 ba[0] = (byte)in.read(); 69 ba[1] = (byte)in.read(); 70 try { 72 return ASCIIUtility.parseInt(ba, 0, 2, 16); 73 } catch (NumberFormatException nex) { 74 throw new IOException("Error in QP stream " + nex.getMessage()); 75 } 76 } else 77 return c; 78 } 79 } 80 | Popular Tags |