Class ShareFileUploadRangeOptions
- java.lang.Object
-
- com.azure.storage.file.share.models.ShareFileUploadRangeOptions
-
public final class ShareFileUploadRangeOptions extends Object
Extended options that may be passed when uploading a file range.
-
-
Constructor Summary
Constructors Constructor Description ShareFileUploadRangeOptions(InputStream dataStream, long length)Constructs a newFileParallelUploadOptions.ShareFileUploadRangeOptions(Flux<ByteBuffer> dataFlux, long length)Constructs a newFileParallelUploadOptions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Flux<ByteBuffer>getDataFlux()Gets the data source.InputStreamgetDataStream()Gets the data source.longgetLength()LonggetOffset()Gets the offset to start writing data at.ShareRequestConditionsgetRequestConditions()Gets theShareRequestConditions.ShareFileUploadRangeOptionssetOffset(Long offset)Sets the offset to start writing data at.ShareFileUploadRangeOptionssetRequestConditions(ShareRequestConditions requestConditions)Sets theShareRequestConditions.
-
-
-
Constructor Detail
-
ShareFileUploadRangeOptions
public ShareFileUploadRangeOptions(Flux<ByteBuffer> dataFlux, long length)
Constructs a newFileParallelUploadOptions.- Parameters:
dataFlux- The data to write to the file. Unlike other upload methods, this method does not require that theFluxbe 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
public ShareFileUploadRangeOptions(InputStream dataStream, long length)
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 aBufferedInputStreamto 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.
-
-
Method Detail
-
getDataFlux
public Flux<ByteBuffer> getDataFlux()
Gets the data source.- Returns:
- The data to write to the file.
-
getDataStream
public InputStream 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
InputStreamorFlux<ByteBuffer>.
-
getOffset
public Long getOffset()
Gets the offset to start writing data at.- Returns:
Longposition to write at.
-
setOffset
public ShareFileUploadRangeOptions setOffset(Long offset)
Sets the offset to start writing data at.- Parameters:
offset-Longposition to write at.- Returns:
- The updated options.
-
getRequestConditions
public ShareRequestConditions getRequestConditions()
Gets theShareRequestConditions.- Returns:
ShareRequestConditions
-
setRequestConditions
public ShareFileUploadRangeOptions setRequestConditions(ShareRequestConditions requestConditions)
Sets theShareRequestConditions.- Parameters:
requestConditions-ShareRequestConditions- Returns:
- The updated options.
-
-