commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julius Davies <juliusdav...@gmail.com>
Subject Re: [codec] Java 1.3 compliant base64 encoder / decoder
Date Thu, 23 Aug 2012 20:30:21 GMT
I think commons-codec-1.3.jar (coincidentally) should work with Java 1.3.

You can find it here:

http://archive.apache.org/dist/commons/codec/binaries/

Unfortunately commons-codec-1.3.jar is unable to do streaming Base64,
but as long as you can fit everything in memory, it works great with
byte[] arrays.


Or you can try to back-port commons-codec-1.6 to work with Java 1.3.
If you go that route I think you just need to pull out the following
classes.  There are probably some modifications you'll need to make it
compile under Java 1.3, but it might be possible.

Base64InputStream.java
Base64.java
Base64OutputStream.java
BaseNCodecInputStream.java
BaseNCodec.java
BaseNCodecOutputStream.java


You would also need to remove the implements declarations
(BinaryEncoder, Encoder, BinaryDecoder, Encoder), and figure what to
do with the EncodingException and DecodingException --- either pull
those out and compile them, too, or replace with RuntimeException, or
create your own.

Good luck!

yours,

Julius



On Thu, Aug 23, 2012 at 3:44 PM, Hendré Louw <hendre@lot24media.co.za> wrote:
> Hello
>
> I am working on a BlackBerry Java 1.3 compliant mobile application and want
> to embed binary image data in a JSON structure. What version of the
> commons-codec source can I use to adapt or just compile a Java 1.3
> compliant base64
> encoder/decoder?
>
> Hendré



-- 
yours,

Julius Davies
604-222-3310 (Home)

$ sudo apt-get install cowsay
$ echo "Moo." | cowsay | cowsay -n | cowsay -n
http://juliusdavies.ca/cowsay/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message