public static final class TestCertUtils.TestCertPath extends CertPath implements Serializable
CertPath.CertPathRep
Constructor and Description |
---|
TestCertUtils.TestCertPath()
Default ctor for TestCertPath.
|
TestCertUtils.TestCertPath(Certificate[] certs)
Constructs TestCertPath and keeps the given array of certificates.
The TestCertPaths constructed via this ctor may be different (if they have different set of certificates) |
Modifier and Type | Method and Description |
---|---|
List<Certificate> |
getCertificates()
Returns an immutable List of the
Certificate s contained
in the CertPath . |
byte[] |
getEncoded()
Returns an encoding of the
CertPath using the default encoding. |
byte[] |
getEncoded(String encoding)
Returns an encoding of the
CertPath using the specified encoding. |
Iterator<String> |
getEncodings()
Returns an
Iterator over the supported encodings for a
representation of the certificate path. |
protected Object |
readResolve() |
String |
toString()
Returns a
String representation of this CertPath
instance. |
protected Object |
writeReplace()
Returns an alternate object to be serialized.
|
public TestCertUtils.TestCertPath()
TestCertUtils.getCertChain()
to obtain list of certificates.public TestCertUtils.TestCertPath(Certificate[] certs)
certs
- TestCertUtils.genCertPath(int, int)
public List<Certificate> getCertificates()
CertPath
Certificate
s contained
in the CertPath
.getCertificates
in class CertPath
Certificate
s in the CertPath
.CertPath.getCertificates()
public byte[] getEncoded() throws CertificateEncodingException
CertPath
CertPath
using the default encoding.getEncoded
in class CertPath
CertPath
.CertificateEncodingException
- if the encoding fails.CertPath.getEncoded()
public byte[] getEncoded(String encoding) throws CertificateEncodingException
CertPath
CertPath
using the specified encoding.getEncoded
in class CertPath
encoding
- encoding that should be generated.CertPath
.CertificateEncodingException
- if the encoding fails.CertPath.getEncoded(java.lang.String)
public Iterator<String> getEncodings()
CertPath
Iterator
over the supported encodings for a
representation of the certificate path.getEncodings
in class CertPath
Iterator
over supported encodings (as String
s).CertPath.getEncodings()
public String toString()
CertPath
String
representation of this CertPath
instance. It is the result of calling toString
on all Certificate
s in the List
.protected Object writeReplace()
CertPath
writeReplace
in class CertPath
protected Object readResolve()