KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > core > protocol > ws > objects > Certificate


1 package org.ejbca.core.protocol.ws.objects;
2
3 import java.security.cert.CertificateEncodingException JavaDoc;
4
5 import org.ejbca.util.Base64;
6
7 public class Certificate {
8     
9     private byte[] certificateData = null;
10     
11     public Certificate(){
12         
13     }
14
15     public Certificate(java.security.cert.Certificate JavaDoc cert) throws CertificateEncodingException JavaDoc{
16         certificateData = Base64.encode(cert.getEncoded());
17     }
18
19     /**
20      * @return Returns the certificateData in Base64 encoded format
21      */

22     public byte[] getCertificateData() {
23         return certificateData;
24     }
25
26     /**
27      * @param certificateData The certificateData to set, in Base64 encoded format.
28      */

29     public void setCertificateData(byte[] certificateData) {
30         this.certificateData = certificateData;
31     }
32
33 }
34
Popular Tags