public static BlobDataType getBlobDataType(String idStr) throws IOException {
    BlobIdPreamble blobIdPreamble =
        new BlobIdPreamble(new DataInputStream(new ByteBufferInputStream(ByteBuffer.wrap(Base64.decodeBase64(idStr)))));
    return blobIdPreamble.blobDataType;
  }
Returns the blob data type of a given Blob id.
@param idStr the blobId in string form.
@return the {@Link BlobDataType} indicating the data type of the blob.
@throws IOException if the input is not a valid Blob id.
ambry-commons/src/main/java/com/github/ambry/commons/BlobId.java