/** * Returns the current GMT date/time String using the RFC1123 pattern. * * @return A <code>String</code> that represents the current GMT date/time using the RFC1123 pattern. */ public static String getGMTTime() { return getGMTTime(new Date()); }
/** * Returns the current GMT date/time String using the RFC1123 pattern. * * @return A <code>String</code> that represents the current GMT date/time using the RFC1123 pattern. */ public static String getGMTTime() { return getGMTTime(new Date()); }
/** * RESERVED FOR INTERNAL USE. Applies the access conditions to the request. * * @param request * A <code>java.net.HttpURLConnection</code> object that represents the request * to which the condition is being applied. */ public void applyConditionToRequest(final HttpURLConnection request) { applyLeaseConditionToRequest(request); if (this.ifModifiedSinceDate != null) { request.setRequestProperty(Constants.HeaderConstants.IF_MODIFIED_SINCE, Utility.getGMTTime(this.ifModifiedSinceDate)); } if (this.ifUnmodifiedSinceDate != null) { request.setRequestProperty(Constants.HeaderConstants.IF_UNMODIFIED_SINCE, Utility.getGMTTime(this.ifUnmodifiedSinceDate)); } if (!Utility.isNullOrEmpty(this.ifMatchETag)) { request.setRequestProperty(Constants.HeaderConstants.IF_MATCH, this.ifMatchETag); } if (!Utility.isNullOrEmpty(this.ifNoneMatchETag)) { request.setRequestProperty(Constants.HeaderConstants.IF_NONE_MATCH, this.ifNoneMatchETag); } }
/** * RESERVED FOR INTERNAL USE. Applies the access conditions to the request. * * @param request * A <code>java.net.HttpURLConnection</code> object that represents the request * to which the condition is being applied. */ public void applyConditionToRequest(final HttpURLConnection request) { applyLeaseConditionToRequest(request); if (this.ifModifiedSinceDate != null) { request.setRequestProperty(Constants.HeaderConstants.IF_MODIFIED_SINCE, Utility.getGMTTime(this.ifModifiedSinceDate)); } if (this.ifUnmodifiedSinceDate != null) { request.setRequestProperty(Constants.HeaderConstants.IF_UNMODIFIED_SINCE, Utility.getGMTTime(this.ifUnmodifiedSinceDate)); } if (!Utility.isNullOrEmpty(this.ifMatchETag)) { request.setRequestProperty(Constants.HeaderConstants.IF_MATCH, this.ifMatchETag); } if (!Utility.isNullOrEmpty(this.ifNoneMatchETag)) { request.setRequestProperty(Constants.HeaderConstants.IF_NONE_MATCH, this.ifNoneMatchETag); } }
request.setRequestProperty( Constants.HeaderConstants.SOURCE_IF_MODIFIED_SINCE_HEADER, Utility.getGMTTime(this.ifModifiedSinceDate)); Utility.getGMTTime(this.ifUnmodifiedSinceDate));
request.setRequestProperty( Constants.HeaderConstants.SOURCE_IF_MODIFIED_SINCE_HEADER, Utility.getGMTTime(this.ifModifiedSinceDate)); Utility.getGMTTime(this.ifUnmodifiedSinceDate));
request.setRequestProperty(Constants.HeaderConstants.DATE, Utility.getGMTTime()); final Canonicalizer canonicalizer = CanonicalizerFactory.getBlobQueueFileCanonicalizer(request);
if (creds.getClass().equals(StorageCredentialsAccountAndKey.class)) { opContext = opContext == null ? new OperationContext() : opContext; request.setRequestProperty(Constants.HeaderConstants.DATE, Utility.getGMTTime());
if (creds.getClass().equals(StorageCredentialsAccountAndKey.class)) { opContext = opContext == null ? new OperationContext() : opContext; request.setRequestProperty(Constants.HeaderConstants.DATE, Utility.getGMTTime());
request.setRequestProperty(Constants.HeaderConstants.DATE, Utility.getGMTTime()); final Canonicalizer canonicalizer = CanonicalizerFactory.getBlobQueueFileCanonicalizer(request);