private short getVersionFromBlobString(String blobId) throws Exception {
    DataInputStream dis = new DataInputStream(new ByteBufferInputStream(ByteBuffer.wrap(Base64.decodeBase64(blobId))));
    try {
      return dis.readShort();
    } finally {
      dis.close();
    }
  }
Gets the version number from a blobId string.
@param blobId The blobId string to get version number.
@return Version number
@throws Exception Any unexpected exception.
ambry-commons/src/test/java/com/github/ambry/commons/BlobIdTest.java