Class ShareFileUploadOptions
java.lang.Object
com.azure.storage.file.share.models.ShareFileUploadOptions
Extended options that may be passed when uploading a file range.
-
Constructor Summary
ConstructorDescriptionShareFileUploadOptions
(InputStream dataStream) Constructs a newFileParallelUploadOptions
.ShareFileUploadOptions
(InputStream dataStream, long length) Deprecated.ShareFileUploadOptions
(Flux<ByteBuffer> dataFlux) Constructs a newFileParallelUploadOptions
. -
Method Summary
Modifier and TypeMethodDescriptionGets the data source.Gets the data source.Gets the offset to start writing data at.Gets theParallelTransferOptions
.Gets theShareRequestConditions
.Sets the offset to start writing data at.setParallelTransferOptions
(ParallelTransferOptions parallelTransferOptions) Sets theParallelTransferOptions
.setRequestConditions
(ShareRequestConditions requestConditions) Sets theShareRequestConditions
.
-
Constructor Details
-
ShareFileUploadOptions
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. data provided in theInputStream
.
-
ShareFileUploadOptions
Deprecated.length is no longer necessary; useShareFileUploadOptions(InputStream)
instead.Constructs a newFileParallelUploadOptions
. UseShareFileUploadOptions(InputStream)
instead to supply an InputStream without knowing the exact length beforehand.- 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
.
-
ShareFileUploadOptions
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.
-
-
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
- 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.
-
getParallelTransferOptions
Gets theParallelTransferOptions
.- Returns:
ParallelTransferOptions
-
setParallelTransferOptions
public ShareFileUploadOptions setParallelTransferOptions(ParallelTransferOptions parallelTransferOptions) Sets theParallelTransferOptions
.- Parameters:
parallelTransferOptions
-ParallelTransferOptions
- Returns:
- The updated options.
-
getRequestConditions
Gets theShareRequestConditions
.- Returns:
ShareRequestConditions
-
ShareFileUploadOptions(InputStream)
instead.