private void trialConnect() throws IOException, RetryDirectly, IllegalAccessException,
            FileDownloadSecurityException {
        FileDownloadConnection trialConnection = null;
        try {
            final ConnectionProfile trialConnectionProfile;
            if (isNeedForceDiscardRange) {
                trialConnectionProfile = ConnectionProfile.ConnectionProfileBuild
                        .buildTrialConnectionProfileNoRange();
            } else {
                trialConnectionProfile = ConnectionProfile.ConnectionProfileBuild
                        .buildTrialConnectionProfile();
            }
            final ConnectTask trialConnectTask = new ConnectTask.Builder()
                    .setDownloadId(model.getId())
                    .setUrl(model.getUrl())
                    .setEtag(model.getETag())
                    .setHeader(userRequestHeader)
                    .setConnectionProfile(trialConnectionProfile)
                    .build();
            trialConnection = trialConnectTask.connect();
            handleTrialConnectResult(trialConnectTask.getRequestHeader(),
                    trialConnectTask, trialConnection);

        } finally {
            if (trialConnection != null) trialConnection.ending();
        }
    }
private void trialConnect() throws IOException, RetryDirectly, IllegalAccessException,
            FileDownloadSecurityException {
        FileDownloadConnection trialConnection = null;
        try {
            final ConnectionProfile trialConnectionProfile;
            if (isNeedForceDiscardRange) {
                trialConnectionProfile = ConnectionProfile.ConnectionProfileBuild
                        .buildTrialConnectionProfileNoRange();
            } else {
                trialConnectionProfile = ConnectionProfile.ConnectionProfileBuild
                        .buildTrialConnectionProfile();
            }
            final ConnectTask trialConnectTask = new ConnectTask.Builder()
                    .setDownloadId(model.getId())
                    .setUrl(model.getUrl())
                    .setEtag(model.getETag())
                    .setHeader(userRequestHeader)
                    .setConnectionProfile(trialConnectionProfile)
                    .build();
            trialConnection = trialConnectTask.connect();
            handleTrialConnectResult(trialConnectTask.getRequestHeader(),
                    trialConnectTask, trialConnection);

        } finally {
            if (trialConnection != null) trialConnection.ending();
        }
    }
private void trialConnect ( ) throws IOException , RetryDirectly , IllegalAccessException , FileDownloadSecurityException { FileDownloadConnection trialConnection = null ; try { final ConnectionProfile trialConnectionProfile ; if ( isNeedForceDiscardRange ) { trialConnectionProfile = ConnectionProfile . ConnectionProfileBuild . buildTrialConnectionProfileNoRange ( ) ; } else { trialConnectionProfile = ConnectionProfile . ConnectionProfileBuild . buildTrialConnectionProfile ( ) ; } final ConnectTask trialConnectTask = new ConnectTask . Builder ( ) . setDownloadId ( model . getId ( ) ) . setUrl ( model . getUrl ( ) ) . setEtag ( model . getETag ( ) ) . setHeader ( userRequestHeader ) . setConnectionProfile ( trialConnectionProfile ) . build ( ) ; trialConnection = trialConnectTask . connect ( ) ; handleTrialConnectResult ( trialConnectTask . getRequestHeader ( ) , trialConnectTask , trialConnection ) ; } finally { if ( trialConnection != null ) trialConnection . ending ( ) ; } }
the trial connection is for: 1. etag verify; 2. partial support verify.
the trial connection is for : 1 . etag verify ; 2 . partial support verify .