public static HttpURLConnection copyFrom ( final URI uri , final FileRequestOptions fileOptions , final OperationContext opContext , final AccessCondition sourceAccessCondition , final AccessCondition destinationAccessCondition , String source ) throws StorageException , IOException , URISyntaxException { final HttpURLConnection request = BaseRequest . createURLConnection ( uri , fileOptions , null , opContext ) ; request . setFixedLengthStreamingMode ( 0 ) ; request . setDoOutput ( true ) ; request . setRequestMethod ( Constants . HTTP_PUT ) ; request . setRequestProperty ( Constants . HeaderConstants . COPY_SOURCE_HEADER , source ) ; if ( sourceAccessCondition != null ) { sourceAccessCondition . applyConditionToRequest ( request ) ; } if ( destinationAccessCondition != null ) { destinationAccessCondition . applyConditionToRequest ( request ) ; } return request ; }
Creates a request to copy a file Sign with 0 length .