Java是否有用于uudecoding的任何标准机制?

编程入门 行业动态 更新时间:2024-10-11 13:31:09
本文介绍了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.

推荐答案

是的," Java™EE 7规范API "支持使用uuencode进行编码和解码.

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

请参见 MimeUtility.decode() :

此外,还支持"uuencode".

In addition, "uuencode" is also supported.

更多推荐

Java是否有用于uudecoding的任何标准机制?

本文发布于:2023-11-22 01:36:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1615464.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:机制   标准   Java   uudecoding

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!