Community articlegetBlob method
Added by IBM contributorIBM on May 2, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.



Description

This method extracts a binary long object (Blob). This Blob is a DER-encoded certificate.

Method

   public byte  [] getBlob(
      IntHolder theStatus
      ) throws UWIException;


Parameters

Table 1. Method parameters
ExpressionTypeDescription
theStatusIntHolderA holder that is set with the status of the operation. This will be one of the following:
SecurityUserStatusType.SUSTATUS_OK — The operation was successful.
SecurityUserStatusType.SUSTATUS_ CANCELLED — the operation was cancelled by the user.
SecurityUserStatusType.SUSTATUS_INPUT_ REQUIRED — the operation required user input, but could not receive it (for example, it was run on a server with no user).


Returns

The Blob as a byte array.

Example

The following method extracts the Blob from a certificate, checks the status to make sure the operation was successful, then returns the Blob.
   public byte [] extractBlob(Certificate theCert) throws UWIException
   {
   IntHolder theStatus;
   byte [] theBlob;
 
      /* Get the Blob from the certificate. */
 
      theBlob = theCert.getBlob(theStatus);
 
      /* Check the status to ensure the method worked correctly. */
 
      if (theStatus.value != SecurityUserStatusType.SUSTATUS_OK)
      {
         throw new UWIException("getBlob exited with the wrong status.");
      }
      
      /* Return the Blob. */
 
      return(theBlob);
   }


Parent topic:
Certificate class