public static boolean isCrafted(String idStr) throws IOException {
    BlobIdPreamble blobIdPreamble =
        new BlobIdPreamble(new DataInputStream(new ByteBufferInputStream(ByteBuffer.wrap(Base64.decodeBase64(idStr)))));
    return blobIdPreamble.type == BlobIdType.CRAFTED;
  }
Returns whether a given Blob id is a crafted id.
@param idStr the blobId in string form.
@return true if the id is a crafted id; false otherwise.
@throws IOException if the input is not a valid Blob id.
ambry-commons/src/main/java/com/github/ambry/commons/BlobId.java