public final static String encodeSun(byte[] str) {
String b64enc="";
sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();
b64enc = encoder.encode(str);
return b64enc;
}
String b64enc="";
sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();
b64enc = encoder.encode(str);
return b64enc;
}
public final static byte[] decodeSun(String str) {
byte[] b64dec = null;
try {
sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();
b64dec = decoder.decodeBuffer(str);
} catch (IOException ex) { }
return b64dec;
}
byte[] b64dec = null;
try {
sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();
b64dec = decoder.decodeBuffer(str);
} catch (IOException ex) { }
return b64dec;
}