public static class Identity2Test.CertificateImpl extends Object implements Certificate
Constructor and Description |
---|
Identity2Test.CertificateImpl(X509Certificate cert) |
Modifier and Type | Method and Description |
---|---|
void |
decode(InputStream in)
Decodes a certificate from the given
InputStream . |
void |
encode(OutputStream out)
Encodes this certificate to an output stream.
|
String |
getFormat()
Returns a string identifying the format of this certificate.
|
Principal |
getGuarantor()
Returns the guarantor of this certificate.
|
Principal |
getPrincipal()
Returns the principal of this certificate.
|
PublicKey |
getPublicKey()
Returns the public key of this certificate.
|
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
String |
toString(boolean b)
Returns a string containing a concise, human-readable description of the
this
Certificate . |
public Identity2Test.CertificateImpl(X509Certificate cert)
public Principal getGuarantor()
Certificate
Certificate.getPrincipal()
.getGuarantor
in interface Certificate
Certificate.getPrincipal()
public void encode(OutputStream out)
Certificate
Certificate.decode(InputStream)
method must be able to decode the format
written by this method.encode
in interface Certificate
out
- the OutputStream
to encode this certificate to.Certificate.decode(InputStream)
public void decode(InputStream in)
Certificate
InputStream
. The format of
the data to encode must be that identified by Certificate.getFormat()
and
encoded by Certificate.encode(OutputStream)
.decode
in interface Certificate
in
- the InputStream
to read from.Certificate.encode(OutputStream)
,
Certificate.getFormat()
public String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
public String toString(boolean b)
Certificate
Certificate
.toString
in interface Certificate
b
- whether or not this method should return detailed information.public String getFormat()
Certificate
getFormat
in interface Certificate
public Principal getPrincipal()
Certificate
Certificate.getGuarantor()
.getPrincipal
in interface Certificate
Certificate.getGuarantor()
public PublicKey getPublicKey()
Certificate
getPublicKey
in interface Certificate
Certificate.getGuarantor()
,
Certificate.getPrincipal()