A simple Java UUencoder/UUdecoder library.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Marc Nause 5d4b850182 Fix typo 4 days ago
src Cleanup code 2 months ago
.gitignore added gitignore 1 year ago
CHANGELOG.md Update changelog 1 week ago
LICENSE Add LICENSE 1 year ago
README.md Fix typo 4 days ago
pom.xml [maven-release-plugin] prepare release 1.0.2 1 week ago

README.md

uuencode

This software provides simple UUencode/UUdecoder functionality. The library is written in Java.

Usage

The software uses the decorator design pattern to provide UUencode/UUdecoder functionality. It fits the philosophy of the Java IO package, hence most developers should have no problems using the library.

The following code writes UUencoded data:

UUEncoderStream uuEncoderStream = new UUEncoderStream(outputStream, 644, "valid_plaintext.txt");
uuEncoderStream.write(data);
uuEncoderStream.close();

It is assumed that outputStream is a valid OutputStream (e.g. a FileOutputStream) the encoded data is written to and data contains the data to be encoded.

The code decoding UUencoded data looks similar:

 UUDecoderStream uuDecoderStream = new UUDecoderStream(outputStream);
 uuDecoderStream.write(data.getBytes(StandardCharsets.US_ASCII));
 uuDecoderStream.close()
 int mode = uuDecoderStream.getMode();
 String filename = uuDecoderStream.getFilename();

It is assumed that outputStream is a valid OutputStream (e.g. a FileOutputStream) the decoded data is written to and data contains the encoded data that is to be decoded. After decoding mode and filename from the header line of the encoded data can be retrieved from the UUDecoderStream instance.

Releases

The latest release is available on Maven Central.

It can be added as a Maven dependency:

<dependency>
  <groupId>de.audioattack.util</groupId>
  <artifactId>uuencode</artifactId>
  <version>1.0.2</version>
</dependency>

Or as a Gradle dependency:

implementation("de.audioattack.util:uuencode:1.0.2")

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.