Search code examples
javaandroiduuencode

How to UUEncode in android


Using which libraries, I can UUENcode some binary in Android java? I just couldn't find any UUEncoder api available in java for android.

Does anybody know such an api?


Solution

  • The only libraries that I'm aware of for UUEncoding are Oracle's, which ships with Java SDK (and is not replicated in the Android SDK), and the one in Ant.

    I'm guessing that you're not going to want to include the Ant library in your Android application.

    I did find source for Sun/Oracle's UUEncoder at http://www.docjar.com/html/api/sun/misc/UUEncoder.java.html

    It's GPL2 licensed, so if you feel that your software can meet the demands of that license, you could just copy the source for that one class into your application.

    Failing that, you could implement the algorithm yourself. See, for example, http://www.herongyang.com/encoding/UUEncode-Algorithm.html