Community articlegetBlob method
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars


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


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


Table 1. Method parameters
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).


The Blob as a byte array.


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. */

Parent topic:
Certificate class