Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.azure.storage.blob.models.DownloadRetryOptions;
import com.azure.storage.common.ParallelTransferOptions;
import com.azure.storage.common.implementation.StorageImplUtils;
import com.azure.storage.common.implementation.contentvalidation.DownloadContentValidationOptions;

import java.nio.file.OpenOption;
import java.util.Set;
Expand All @@ -25,6 +26,7 @@ public class BlobDownloadToFileOptions {
private BlobRequestConditions requestConditions;
private boolean retrieveContentRangeMd5;
private Set<OpenOption> openOptions;
private DownloadContentValidationOptions contentValidationOptions;

/**
* Constructs a {@link BlobDownloadToFileOptions}.
Expand Down Expand Up @@ -100,6 +102,15 @@ public Set<OpenOption> getOpenOptions() {
return openOptions;
}

/**
* Gets the {@link DownloadContentValidationOptions}.
*
* @return {@link DownloadContentValidationOptions}
*/
public DownloadContentValidationOptions getContentValidationOptions() {
return contentValidationOptions;
}

/**
* Sets the {@link BlobRange}.
*
Expand Down Expand Up @@ -165,4 +176,15 @@ public BlobDownloadToFileOptions setOpenOptions(Set<OpenOption> openOptions) {
this.openOptions = openOptions;
return this;
}

/**
* Sets the {@link DownloadContentValidationOptions}.
*
* @param contentValidationOptions {@link DownloadContentValidationOptions}
* @return The updated options.
*/
public BlobDownloadToFileOptions setContentValidationOptions(DownloadContentValidationOptions contentValidationOptions) {
this.contentValidationOptions = contentValidationOptions;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.azure.storage.blob.models.BlobRange;
import com.azure.storage.blob.models.BlobRequestConditions;
import com.azure.storage.blob.models.ConsistentReadControl;
import com.azure.storage.common.implementation.contentvalidation.DownloadContentValidationOptions;

/**
* Extended options that may be passed when opening a blob input stream.
Expand All @@ -17,6 +18,7 @@ public class BlobInputStreamOptions {
private BlobRequestConditions requestConditions;
private Integer blockSize;
private ConsistentReadControl consistentReadControl;
private DownloadContentValidationOptions contentValidationOptions;

/**
* Creates a new instance of {@link BlobInputStreamOptions}.
Expand Down Expand Up @@ -111,4 +113,24 @@ public BlobInputStreamOptions setConsistentReadControl(ConsistentReadControl con
this.consistentReadControl = consistentReadControl;
return this;
}

/**
* Gets the {@link DownloadContentValidationOptions}.
*
* @return {@link DownloadContentValidationOptions}
*/
public DownloadContentValidationOptions getContentValidationOptions() {
return contentValidationOptions;
}

/**
* Sets the {@link DownloadContentValidationOptions}.
*
* @param contentValidationOptions {@link DownloadContentValidationOptions}
* @return The updated options.
*/
public BlobInputStreamOptions setContentValidationOptions(DownloadContentValidationOptions contentValidationOptions) {
this.contentValidationOptions = contentValidationOptions;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.storage.blob.models.BlobRequestConditions;
import com.azure.storage.blob.models.ConsistentReadControl;
import com.azure.storage.common.implementation.contentvalidation.DownloadContentValidationOptions;

import java.nio.channels.SeekableByteChannel;

Expand All @@ -18,6 +19,7 @@ public final class BlobSeekableByteChannelReadOptions {
private BlobRequestConditions requestConditions;
private Integer readSizeInBytes;
private ConsistentReadControl consistentReadControl;
private DownloadContentValidationOptions contentValidationOptions;

/**
* Creates a new instance of {@link BlobSeekableByteChannelReadOptions}.
Expand Down Expand Up @@ -108,4 +110,24 @@ public BlobSeekableByteChannelReadOptions setConsistentReadControl(ConsistentRea
this.consistentReadControl = consistentReadControl;
return this;
}

/**
* Gets the {@link DownloadContentValidationOptions}.
*
* @return {@link DownloadContentValidationOptions}
*/
public DownloadContentValidationOptions getContentValidationOptions() {
return contentValidationOptions;
}

/**
* Sets the {@link DownloadContentValidationOptions}.
*
* @param contentValidationOptions {@link DownloadContentValidationOptions}
* @return The updated options.
*/
public BlobSeekableByteChannelReadOptions setContentValidationOptions(DownloadContentValidationOptions contentValidationOptions) {
this.contentValidationOptions = contentValidationOptions;
return this;
}
}
Loading
Loading