InterruptedException, IOException {
AccessPolicyInfo readAP = service.create(AccessPolicy.create(
testPolicyPrefix + "tempAccessPolicy",
availabilityWindowInMinutes,
EnumSet.of(AccessPolicyPermission.READ)));
LocatorInfo readLocator = service.create(Locator.create(readAP.getId(),
assetId, LocatorType.SAS));
URL file = new URL(readLocator.getBaseUri() + "/" + fileName
+ readLocator.getContentAccessToken());
// There can be a delay before a new read locator is applied for the
// asset files.
InputStream reader = null;
for (int counter = 0; true; counter++) {