Java是否有用于uudecoding的任何标准机制? [英] Does Java has any standard mechanism for uudecoding?

查看:96
本文介绍了Java是否有用于uudecoding的任何标准机制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个Java程序,用于从POP3电子邮件中下载附件.最初,我通过获取MimePart的输入流(如果其内容类型经过验证)来实现此目的.然后,我可以简单地通过FileOutputStream将输入流写入本地文件中.

I was writing a Java program to download attachments from POP3 email. Originally I do this with getting an input stream of a MimePart if its content type is validated. And then I can simply write the input stream into a local file through a FileOutputStream.

但是,我遇到的一件事是,当我收到一封带有附件文件作为唯一内容的电子邮件并访问它之后,该邮件(消息类型)仅由一个部分组成,即文本/普通类型.其内容由大量随机外观的字符组成.

However, one thing I encountered is that, after I received an email with an attached file as its only content and access it, the mail (of type Message) only consists of a single part, which is of type text/plain. And its content consists of massive random-looking character.

在互联网上搜索后,我发现该文件已被uuencoded.然后,我试图找到是否有用于解码它的标准库,但似乎运气不佳.因此,我想知道是否有任何标准/常规方法可以对其进行解码并获取附件?非常感谢.

After searching through the internet I found that the file is uuencoded. Then I tried to find if there is any standard library for decoding it but seems I ran out of luck. So I would like to know is there any standard/ usual ways to decode it and obtain the attached file? Thanks a lot.

推荐答案

是的,"uuencode进行编码和解码.

Yes, the "Java(TM) EE 7 Specification APIs" supports encoding and decoding with uuencode.

请参见

此外,还支持"uuencode".

In addition, "uuencode" is also supported.

这篇关于Java是否有用于uudecoding的任何标准机制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆