public static HttpURLConnection resize(final URI uri, final FileRequestOptions fileOptions,
            final OperationContext opContext, final AccessCondition accessCondition, final Long newFileSize)
            throws IOException, URISyntaxException, StorageException {
        final HttpURLConnection request = setFileProperties(uri, fileOptions, opContext, accessCondition, null);

        if (newFileSize != null) {
            request.setRequestProperty(FileConstants.CONTENT_LENGTH_HEADER, newFileSize.toString());
        }

        return request;
    }
public static HttpURLConnection resize(final URI uri, final FileRequestOptions fileOptions,
            final OperationContext opContext, final AccessCondition accessCondition, final Long newFileSize)
            throws IOException, URISyntaxException, StorageException {
        final HttpURLConnection request = setFileProperties(uri, fileOptions, opContext, accessCondition, null);

        if (newFileSize != null) {
            request.setRequestProperty(FileConstants.CONTENT_LENGTH_HEADER, newFileSize.toString());
        }

        return request;
    }
public static HttpURLConnection resize ( final URI uri , final FileRequestOptions fileOptions , final OperationContext opContext , final AccessCondition accessCondition , final Long newFileSize ) throws IOException , URISyntaxException , StorageException { final HttpURLConnection request = setFileProperties ( uri , fileOptions , opContext , accessCondition , null ) ; if ( newFileSize != null ) { request . setRequestProperty ( FileConstants . CONTENT_LENGTH_HEADER , newFileSize . toString ( ) ) ; } return request ; }
Constructs a HttpURLConnection to set the file's size, Sign with zero length specified.

@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
An {@link AccessCondition} object that represents the access conditions for the file.
@param newFileSize
The new file size. Set this parameter to null to keep the existing file size.
@return a HttpURLConnection to use to perform the operation.
@throws IOException
if there is an error opening the connection
@throws URISyntaxException
if the resource URI is invalid
@throws StorageException
an exception representing any error which occurred during the operation.
@throws IllegalArgumentException
Constructs a HttpURLConnection to set the file s size Sign with zero length specified .