microsoft-azure-storage/src/com/microsoft/azure/storage/file/FileRequest.java
public static HttpURLConnection abortCopy(final URI uri, final FileRequestOptions fileOptions,
            final OperationContext opContext, final AccessCondition accessCondition, final String copyId)
            throws StorageException, IOException, URISyntaxException {

        final UriQueryBuilder builder = new UriQueryBuilder();

        builder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.COPY);
        builder.add(Constants.QueryConstants.COPY_ID, copyId);

        final HttpURLConnection request = BaseRequest.createURLConnection(uri, fileOptions, builder, opContext);

        request.setFixedLengthStreamingMode(0);
        request.setDoOutput(true);
        request.setRequestMethod(Constants.HTTP_PUT);

        request.setRequestProperty(Constants.HeaderConstants.COPY_ACTION_HEADER,
                Constants.HeaderConstants.COPY_ACTION_ABORT);

        if (accessCondition != null) {
            accessCondition.applyConditionToRequest(request);
        }

        return request;
    }
public static HttpURLConnection abortCopy(final URI uri, final FileRequestOptions fileOptions,
            final OperationContext opContext, final AccessCondition accessCondition, final String copyId)
            throws StorageException, IOException, URISyntaxException {

        final UriQueryBuilder builder = new UriQueryBuilder();

        builder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.COPY);
        builder.add(Constants.QueryConstants.COPY_ID, copyId);

        final HttpURLConnection request = BaseRequest.createURLConnection(uri, fileOptions, builder, opContext);

        request.setFixedLengthStreamingMode(0);
        request.setDoOutput(true);
        request.setRequestMethod(Constants.HTTP_PUT);

        request.setRequestProperty(Constants.HeaderConstants.COPY_ACTION_HEADER,
                Constants.HeaderConstants.COPY_ACTION_ABORT);

        if (accessCondition != null) {
            accessCondition.applyConditionToRequest(request);
        }

        return request;
    }
public static HttpURLConnection abortCopy ( final URI uri , final FileRequestOptions fileOptions , final OperationContext opContext , final AccessCondition accessCondition , final String copyId ) throws StorageException , IOException , URISyntaxException { final UriQueryBuilder builder = new UriQueryBuilder ( ) ; builder . add ( Constants . QueryConstants . COMPONENT , Constants . QueryConstants . COPY ) ; builder . add ( Constants . QueryConstants . COPY_ID , copyId ) ; final HttpURLConnection request = BaseRequest . createURLConnection ( uri , fileOptions , builder , opContext ) ; request . setFixedLengthStreamingMode ( 0 ) ; request . setDoOutput ( true ) ; request . setRequestMethod ( Constants . HTTP_PUT ) ; request . setRequestProperty ( Constants . HeaderConstants . COPY_ACTION_HEADER , Constants . HeaderConstants . COPY_ACTION_ABORT ) ; if ( accessCondition != null ) { accessCondition . applyConditionToRequest ( request ) ; } return request ; }
Generates a web request to abort a copy operation.

@param uri
A <code>java.net.URI</code> object that specifies the absolute URI.
@param fileOptions
A {@link FileRequestOptions} object that specifies execution options such as retry policy and timeout
settings for the operation. Specify <code>null</code> to use the request options specified on the
{@link CloudFileClient}.
@param opContext
An {@link OperationContext} object that represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.
@param accessCondition
The access condition to apply to the request. Only lease conditions are supported for this operation.
@param copyId
A <code>String</code> object that identifying the copy operation.
@return a <code>HttpURLConnection</code> configured for the operation.
@throws StorageException
An exception representing any error which occurred during the operation.
@throws IllegalArgumentException
@throws IOException
@throws URISyntaxException
Generates a web request to abort a copy operation .