Example #1
0
 public static String encodeArray(D_ReleaseQuality[] a) {
   if (a == null) return null;
   Encoder enc = Encoder.getEncoder(a);
   //	enc.setASN1Type(getASNType());
   byte[] b = enc.getBytes();
   return new String(util.Base64Coder.encode(b));
 }
Example #2
0
 public static D_ReleaseQuality[] reconstructArrayFromString(String s) throws ASN1DecoderFail {
   if (s == null) return null;
   byte[] data = util.Base64Coder.decode(s);
   Decoder dec = new Decoder(data);
   D_ReleaseQuality result[] =
       dec.getSequenceOf(getASNType(), new D_ReleaseQuality[0], new D_ReleaseQuality());
   return result;
 }
Example #3
0
 /**
  * Duplicated in tools.ReleaseQuality
  *
  * @param args
  */
 public static void main(String[] args) {
   if (args.length != 1) {
     Application_GUI.warning(
         __("Bad parameters list: need xml_file_name;"), __("RELEASE QUALITY"));
     return;
   }
   File xml = new File(args[0]);
   if (!xml.isFile()) {
     Application_GUI.warning(
         __("Bad parameters list: need existing xml_file_name;"), __("RELEASE QUALITY"));
     return;
   }
   D_ReleaseQuality[] rq = parseXML(xml);
   Encoder enc = Encoder.getEncoder(rq);
   System.out.println(new String(Base64Coder.encode(enc.getBytes())));
 }