Class ReadToFileOptions
java.lang.Object
com.azure.storage.file.datalake.options.ReadToFileOptions
Parameters when calling readToFile() on
DataLakeFileClient-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets theDataLakeRequestConditions.Gets theDownloadRetryOptions.Gets the path of the file to download to.Gets theOpenOptionsto use to configure how to open or create the file.com.azure.storage.common.ParallelTransferOptionsGets theParallelTransferOptionsto use to download to file.getRange()Gets theFileRange.Gets whether the contentMD5 for the specified file range should be returned.Gets the value for the x-ms-upn header.setDataLakeRequestConditions(DataLakeRequestConditions dataLakeRequestConditions) Sets theDataLakeRequestConditions.setDownloadRetryOptions(DownloadRetryOptions downloadRetryOptions) Sets theDownloadRetryOptions.setOpenOptions(Set<OpenOption> openOptions) Sets theOpenOptionsto use to configure how to open or create the file.setParallelTransferOptions(com.azure.storage.common.ParallelTransferOptions parallelTransferOptions) Sets theParallelTransferOptionsto use to download to file.Sets theFileRange.setRangeGetContentMd5(Boolean rangeGetContentMd5) Sets whether the contentMD5 for the specified file range should be returned.setUserPrincipalName(Boolean userPrincipalName) Sets the value for the x-ms-upn header.
-
Constructor Details
-
ReadToFileOptions
Constructs aReadToFileOptions.- Parameters:
filePath- Path of the file to download to.- Throws:
NullPointerException- IffilePathis null.
-
-
Method Details
-
getFilePath
Gets the path of the file to download to.- Returns:
- The path where the downloaded data will be written.
-
getRange
Gets theFileRange.- Returns:
FileRange
-
setRange
Sets theFileRange.- Parameters:
range-FileRange- Returns:
- The updated options.
-
getParallelTransferOptions
public com.azure.storage.common.ParallelTransferOptions getParallelTransferOptions()Gets theParallelTransferOptionsto use to download to file. Number of parallel transfers parameter is ignored.- Returns:
ParallelTransferOptionsto use to download to file. Number of parallel transfers parameter is ignored.
-
setParallelTransferOptions
public ReadToFileOptions setParallelTransferOptions(com.azure.storage.common.ParallelTransferOptions parallelTransferOptions) Sets theParallelTransferOptionsto use to download to file. Number of parallel transfers parameter is ignored.- Parameters:
parallelTransferOptions-ParallelTransferOptionsto use to download to file. Number of parallel transfers parameter is ignored.- Returns:
- The updated options.
-
getDownloadRetryOptions
Gets theDownloadRetryOptions.- Returns:
DownloadRetryOptions
-
setDownloadRetryOptions
Sets theDownloadRetryOptions.- Parameters:
downloadRetryOptions-DownloadRetryOptions- Returns:
- The updated options.
-
getDataLakeRequestConditions
Gets theDataLakeRequestConditions.- Returns:
- requestConditions
DataLakeRequestConditions
-
setDataLakeRequestConditions
public ReadToFileOptions setDataLakeRequestConditions(DataLakeRequestConditions dataLakeRequestConditions) Sets theDataLakeRequestConditions.- Parameters:
dataLakeRequestConditions-DataLakeRequestConditions- Returns:
- The updated options.
- Throws:
UncheckedIOException- If an I/O error occurs.
-
isRangeGetContentMd5
Gets whether the contentMD5 for the specified file range should be returned.- Returns:
- Whether the contentMD5 for the specified file range should be returned.
-
setRangeGetContentMd5
Sets whether the contentMD5 for the specified file range should be returned.- Parameters:
rangeGetContentMd5- Whether the contentMD5 for the specified file range should be returned.- Returns:
- The updated options.
-
getOpenOptions
Gets theOpenOptionsto use to configure how to open or create the file.- Returns:
OpenOptionsto use to configure how to open or create the file.
-
setOpenOptions
Sets theOpenOptionsto use to configure how to open or create the file.- Parameters:
openOptions-OpenOptionsto use to configure how to open or create the file.- Returns:
- The updated options.
-
isUserPrincipalName
Gets the value for the x-ms-upn header.- Returns:
- The value for the x-ms-upn header.
-
setUserPrincipalName
Sets the value for the x-ms-upn header.- Parameters:
userPrincipalName- The value for the x-ms-upn header.- Returns:
- The updated options.
-