Class ShareFileUploadRangeOptions
java.lang.Object
com.azure.storage.file.share.models.ShareFileUploadRangeOptions
Extended options that may be passed when uploading a file range.
-
Constructor Summary
ConstructorsConstructorDescriptionShareFileUploadRangeOptions
(InputStream dataStream, long length) Constructs a newFileParallelUploadOptions
.ShareFileUploadRangeOptions
(Flux<ByteBuffer> dataFlux, long length) Constructs a newFileParallelUploadOptions
. -
Method Summary
Modifier and TypeMethodDescriptionGets the data source.Gets the data source.Gets theFileLastWrittenMode
.long
Gets the offset to start writing data at.Gets theShareRequestConditions
.setLastWrittenMode
(FileLastWrittenMode lastWrittenMode) Sets theFileLastWrittenMode
.Sets the offset to start writing data at.setRequestConditions
(ShareRequestConditions requestConditions) Sets theShareRequestConditions
.
-
Constructor Details
-
ShareFileUploadRangeOptions
Constructs a newFileParallelUploadOptions
.- Parameters:
dataFlux
- The data to write to the file. Unlike other upload methods, this method does not require that theFlux
be replayable. In other words, it does not have to support multiple subscribers and is not expected to produce the same values across subscriptions.length
- The exact length of the data. It is important that this value match precisely the length of the data provided in theInputStream
.
-
ShareFileUploadRangeOptions
Constructs a newFileParallelUploadOptions
.- Parameters:
dataStream
- The data to write to the file. The data must be markable. This is in order to support retries. If the data is not markable, consider wrapping your data source in aBufferedInputStream
to add mark support.length
- The exact length of the data. It is important that this value match precisely the length of the data provided in theInputStream
. Value must be greater than or equal to 1.
-
-
Method Details
-
getDataFlux
Gets the data source.- Returns:
- The data to write to the file.
-
getDataStream
Gets the data source.- Returns:
- The data to write to the file.
-
getLength
public long getLength()- Returns:
- The exact length of the data. It is important that this value match precisely the length of the
data provided in the
InputStream
orFlux
<ByteBuffer
>.
-
getOffset
Gets the offset to start writing data at.- Returns:
Long
position to write at.
-
setOffset
Sets the offset to start writing data at.- Parameters:
offset
-Long
position to write at.- Returns:
- The updated options.
-
getRequestConditions
Gets theShareRequestConditions
.- Returns:
ShareRequestConditions
-
getLastWrittenMode
Gets theFileLastWrittenMode
.- Returns:
- The
FileLastWrittenMode
.
-