It appears that UUEncoder is a subclass of
http://java.sun.com/products/commerce/docs/api/javax.commerce.util.CharacterEncoder.html

This program seems to do something interesting...

public class UUEncodeTest {
public static void main(String argv[]) throws IOException {
UUEncoder encoder = new UUEncoder("foo",777); // ?
UUDecoder decoder = new UUDecoder();
byte bytes[] = new byte[] { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 };
String encoded = encoder.encodeBuffer(bytes);
byte decoded[] = decoder.decodeBuffer(encoded);
if(!Arrays.equals(bytes,decoded))
throw new RuntimeException(Arrays.toString(bytes) + " != " + Arrays.toString(decoded));
System.out.println(encoded);
}
}


Here's the output:
begin 777 foo
(  $" P0%!@<!

end

The effect of the constructor arguments is obvious (and they're unnecessary), but their meaning is totally unclear to me.



Thomas Hicks wrote:
At 06:10 PM 11/2/2004, you wrote:

Looks like there are bits built into Java itself: sun.misc.UUEncoder


Thanks Eric. I saw this but couldn't find any docs on how to use it.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to