private void validateChunkSize(long chunkSize) {
        if (chunkSize <= 0) {
            throw new AmazonClientException("Invalid chunk size, chunk size must be great than 0");
        }

        // Chunk size must be aligned on 2^n MB boundaries
        if ((chunkSize & (chunkSize - 1)) != 0) {
            throw new AmazonClientException("Invalid chunk size, chunk size must be aligned on 2^n MB boundaries");
        }
    }
Downloads the job output for the specified job (which must be ready to
download already, and must be a complete archive retrieval, not a partial
range retrieval), into the specified file. This method will request
individual chunks of the data, one at a time, in order to handle any
transient errors along the way. You can also add an optional progress
listener for receiving updates about the download status.

@param accountId
           The account ID containing the job output to download (or null
           if the current account shoudl be used).
@param vaultName
           The name of the vault from where the job was initiated.
@param jobId
           The ID of the job whose output is to be downloaded. This job
           must be a complete archive retrieval, not a range retrieval.
@param file
           The file to download the job output into.
@param progressListener
           The optional progress listener for receiving updates about the
           download status.
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/transfer/ArchiveTransferManager.java