/** * Returns the canonical name of the blob in the format of * <i>/<service-name>/<account-name>/<container-name>/<blob-name></i>. * <p> * This format is used for Shared Access operations. * * @param ignoreSnapshotTime * <code>true</code> if the snapshot time is ignored; otherwise, <code>false</code>. * * @return The canonical name in the format of <i>/<service-name>/<account-name> * /<container-name>/<blob-name></i>. */ String getCanonicalName(final boolean ignoreSnapshotTime) { StringBuilder canonicalName = new StringBuilder("/"); canonicalName.append(SR.BLOB); if (this.blobServiceClient.isUsePathStyleUris()) { canonicalName.append(this.getUri().getRawPath()); } else { canonicalName.append(PathUtility.getCanonicalPathFromCredentials( this.blobServiceClient.getCredentials(), this.getUri().getRawPath())); } if (!ignoreSnapshotTime && this.snapshotID != null) { canonicalName.append("?snapshot="); canonicalName.append(this.snapshotID); } return canonicalName.toString(); }
/** * Returns the canonical name of the blob in the format of * <i>/<service-name>/<account-name>/<container-name>/<blob-name></i>. * <p> * This format is used for Shared Access operations. * * @param ignoreSnapshotTime * <code>true</code> if the snapshot time is ignored; otherwise, <code>false</code>. * * @return The canonical name in the format of <i>/<service-name>/<account-name> * /<container-name>/<blob-name></i>. */ String getCanonicalName(final boolean ignoreSnapshotTime) { StringBuilder canonicalName = new StringBuilder("/"); canonicalName.append(SR.BLOB); if (this.blobServiceClient.isUsePathStyleUris()) { canonicalName.append(this.getUri().getRawPath()); } else { canonicalName.append(PathUtility.getCanonicalPathFromCredentials( this.blobServiceClient.getCredentials(), this.getUri().getRawPath())); } if (!ignoreSnapshotTime && this.snapshotID != null) { canonicalName.append("?snapshot="); canonicalName.append(this.snapshotID); } return canonicalName.toString(); }
/** * Returns the canonical name of the file in the format of * <i>/<service-name>/<account-name>/<share-name>/<file-name></i>. * <p> * This format is used for Shared Access operations. * * @return The canonical name in the format of <i>/<service-name>/<account-name> * /<share-name>/<file-name></i>. */ String getCanonicalName() { StringBuilder canonicalName = new StringBuilder("/"); canonicalName.append(SR.FILE); String rawPath = this.getUri().getRawPath(); if (this.fileServiceClient.isUsePathStyleUris()) { canonicalName.append(rawPath); } else { canonicalName.append(PathUtility.getCanonicalPathFromCredentials( this.getServiceClient().getCredentials(), rawPath)); } return canonicalName.toString(); }
/** * Returns the canonical name of the file in the format of * <i>/<service-name>/<account-name>/<share-name>/<file-name></i>. * <p> * This format is used for Shared Access operations. * * @return The canonical name in the format of <i>/<service-name>/<account-name> * /<share-name>/<file-name></i>. */ String getCanonicalName() { StringBuilder canonicalName = new StringBuilder("/"); canonicalName.append(SR.FILE); String rawPath = this.getUri().getRawPath(); if (this.fileServiceClient.isUsePathStyleUris()) { canonicalName.append(rawPath); } else { canonicalName.append(PathUtility.getCanonicalPathFromCredentials( this.getServiceClient().getCredentials(), rawPath)); } return canonicalName.toString(); }