public class Utils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
STREAM_BUFFER
Default size used to copy streams set to 4096 bytes
|
| Modifier and Type | Method and Description |
|---|---|
static void |
copyStream(java.io.InputStream inputstream,
java.io.OutputStream outputstream,
byte[] buf)
Copies an input stream to an output stream using the specified buffer size.
|
static SigningCertificate |
makeSigningCertificate(java.security.cert.Certificate[] certs,
PolicyInformation[] policies,
boolean includeIssuerSerial)
Creates an ESS SigningCertificate for the given X.509 certificates
and policy informations.
|
static SigningCertificate |
makeSigningCertificate(ESSCertID[] certIDs,
PolicyInformation[] policies)
Creates an ESS SigningCertificate for the given certIDs
and policy informations.
|
static SigningCertificateV2 |
makeSigningCertificateV2(java.security.cert.Certificate[] certs,
PolicyInformation[] policies,
boolean includeIssuerSerial)
Creates an ESS SigningCertificate V2 for the given X.509 certificates
and policy informations.
|
static SigningCertificateV2 |
makeSigningCertificateV2(ESSCertIDv2[] certIDs,
PolicyInformation[] policies)
Creates an ESS SigningCertificate for the given certIDs
and policy informations.
|
public static final int STREAM_BUFFER
public static SigningCertificate makeSigningCertificate(java.security.cert.Certificate[] certs, PolicyInformation[] policies, boolean includeIssuerSerial) throws CMSException
certs - the certificates to be identifiedpolicies - the PolicyInformation terms to be includedincludeIssuerSerial - whether to set the issuerSerial field for
for the ESSCertIDs to be createdCMSExceptionpublic static SigningCertificateV2 makeSigningCertificateV2(java.security.cert.Certificate[] certs, PolicyInformation[] policies, boolean includeIssuerSerial) throws CMSException
certs - the certificates to be identifiedpolicies - the PolicyInformation terms to be includedincludeIssuerSerial - whether to set the issuerSerial field for
for the ESSCertIDs to be createdCMSExceptionpublic static SigningCertificate makeSigningCertificate(ESSCertID[] certIDs, PolicyInformation[] policies)
certIDs - the ESSCertIDs to be includedpolicies - the PolicyInformation terms to be includedpublic static SigningCertificateV2 makeSigningCertificateV2(ESSCertIDv2[] certIDs, PolicyInformation[] policies)
certIDs - the ESSCertIDs to be includedpolicies - the PolicyInformation terms to be includedpublic static void copyStream(java.io.InputStream inputstream,
java.io.OutputStream outputstream,
byte[] buf)
throws java.io.IOException
inputstream - - The input stream to be copies to outputStreamoutputstream - - The Output stream which will receive the databuf - java.io.IOException