try { return new ObjectInputStream( new ByteArrayInputStream( data ) ).readObject(); } catch ( Exception e ) { e.printStackTrace(); throw new RuntimeException ( e.toString() ); }
try { CertificateFactory fact = CertificateFactory.getInstance(type); return fact.generateCertificate(new ByteArrayInputStream(data)); } catch (Exception e) { throw new InvalidObjectException(e.toString()); }
    protected Object readResolve()      throws ObjectStreamException    {      try {	return new ObjectInputStream( new ByteArrayInputStream( data ) ).readObject();      } catch ( Exception e ) {	e.printStackTrace();	throw new RuntimeException ( e.toString() );      }    }