Hi everyone
I am writing an mail client application that receives some mails and extracts their attachments. Unfortunately the mails are in some strange format - no content type and encoding specified. I know that they are uuencoded, so I am trying to decode them in this way:
 
// it is not the best way but I am trying different ways...
 
                final BufferedReader reader = new BufferedReader(
                        new InputStreamReader(MimeUtility.decode(new StringBufferInputStream(sb.toString()), "uuencode")));
                int max = 1000;
                char [] c = new char[max];
                int count = reader.read(c);
 
                while(count>-1){
                    inlineText.append(c, 0, count);
                    System.out.println(new String(c, 0, count));
                    count = reader.read(c);
                }
but the code does not return all the data that is in the atached file. The last symbols are skipped. I looked at java.sun.com for such bug in the MimeUtility, but didn,t find one. Does anyone have idea what can be the problem?
To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to