Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

biagioT/java-uudecoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

23 Commits

Repository files navigation

JAVA UUDecoder

Utility for decoding uuencoded contents. Extract text and attachments from an uuencoded mail.

Usage

<dependency>
	<groupId>app.tozzi</groupId>
	<artifactId>uudecoder</artifactId>
	<version>4.0.0</version>
</dependency>

Simple example of use:

String uuencodedContent = ...;
UUDecodedBean decodedBean = UUDecodedBean decode(content); 		 
String content = decodedBean.getContent(); 
List<UUDecodedAttachment> attachments = decodedBean.getAttachments();

Advanced example:

// MimePart part = ...
if (part.isMimeType("text/plain")) {
	
 Object partContent = part.getContent();
 String txtContent = partContent.toString();
 if (UUDecoder.containsUUEncodedAttachments(txtContent)) {
 txtContent = txtContent.substring(0, UUDecoder.getNextBeginIndex(txtContent));
 for (UUDecodedAttachment uda : UUDecoder.getUUDecodedAttachments(partContent.toString())) {
	 String fileName = uda.getFileName();
	 DataSource dataSource = uda.getDataSource();
	 // ...
 }
 }
	
 // ...
 String txtBody = MimeUtility.decodeText(txtContent);
}
// ...

Requirements

  • >= Java 8

License

  • The project license file is available here.

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /