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 theOpenOptions
to use to configure how to open or create the file.com.azure.storage.common.ParallelTransferOptions
Gets theParallelTransferOptions
to 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 theOpenOptions
to use to configure how to open or create the file.setParallelTransferOptions
(com.azure.storage.common.ParallelTransferOptions parallelTransferOptions) Sets theParallelTransferOptions
to 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
- IffilePath
is 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 theParallelTransferOptions
to use to download to file. Number of parallel transfers parameter is ignored.- Returns:
ParallelTransferOptions
to use to download to file. Number of parallel transfers parameter is ignored.
-
setParallelTransferOptions
public ReadToFileOptions setParallelTransferOptions(com.azure.storage.common.ParallelTransferOptions parallelTransferOptions) Sets theParallelTransferOptions
to use to download to file. Number of parallel transfers parameter is ignored.- Parameters:
parallelTransferOptions
-ParallelTransferOptions
to 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 theOpenOptions
to use to configure how to open or create the file.- Returns:
OpenOptions
to use to configure how to open or create the file.
-
setOpenOptions
Sets theOpenOptions
to use to configure how to open or create the file.- Parameters:
openOptions
-OpenOptions
to 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.
-