共用方式為


X509Certificate.GetInstance Method

Definition

Overloads

GetInstance(Byte[])

Instantiates an X509Certificate object, and initializes it with the specified byte array.

GetInstance(Stream)

Instantiates an X509Certificate object, and initializes it with the data read from the input stream inStream.

GetInstance(Byte[])

Instantiates an X509Certificate object, and initializes it with the specified byte array.

[Android.Runtime.Register("getInstance", "([B)Ljavax/security/cert/X509Certificate;", "")]
public static Javax.Security.Cert.X509Certificate? GetInstance (byte[]? certData);
[<Android.Runtime.Register("getInstance", "([B)Ljavax/security/cert/X509Certificate;", "")>]
static member GetInstance : byte[] -> Javax.Security.Cert.X509Certificate

Parameters

certData
Byte[]

a byte array containing the DER-encoded certificate.

Returns

an X509Certificate object initialized with the data from certData.

Attributes

Exceptions

if the certificate cannot be created or initialized.

Remarks

Instantiates an X509Certificate object, and initializes it with the specified byte array. The implementation (X509Certificate is an abstract class) is provided by the class specified as the value of the cert.provider.x509v1 security property.

Note: All X509Certificate subclasses must provide a constructor of the form:

{@code
            public <subClass>(InputStream inStream) ...
            }

Java documentation for javax.security.cert.X509Certificate.getInstance(byte[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetInstance(Stream)

Instantiates an X509Certificate object, and initializes it with the data read from the input stream inStream.

[Android.Runtime.Register("getInstance", "(Ljava/io/InputStream;)Ljavax/security/cert/X509Certificate;", "")]
public static Javax.Security.Cert.X509Certificate? GetInstance (System.IO.Stream? inStream);
[<Android.Runtime.Register("getInstance", "(Ljava/io/InputStream;)Ljavax/security/cert/X509Certificate;", "")>]
static member GetInstance : System.IO.Stream -> Javax.Security.Cert.X509Certificate

Parameters

inStream
Stream

an input stream with the data to be read to initialize the certificate.

Returns

an X509Certificate object initialized with the data from the input stream.

Attributes

Exceptions

if the certificate cannot be created or initialized.

Remarks

Instantiates an X509Certificate object, and initializes it with the data read from the input stream inStream. The implementation (X509Certificate is an abstract class) is provided by the class specified as the value of the cert.provider.x509v1 security property.

Note: Only one DER-encoded certificate is expected to be in the input stream. Also, all X509Certificate subclasses must provide a constructor of the form:

{@code
            public <subClass>(InputStream inStream) ...
            }

Java documentation for javax.security.cert.X509Certificate.getInstance(java.io.InputStream).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to