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 .