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.InputStream
getDataStream()
Gets the data source.FileLastWrittenMode
getLastWrittenMode()
Gets theFileLastWrittenMode
.long
getLength()
Long
getOffset()
Gets the offset to start writing data at.ShareRequestConditions
getRequestConditions()
Gets theShareRequestConditions
.ShareFileUploadRangeOptions
setLastWrittenMode(FileLastWrittenMode lastWrittenMode)
Sets theFileLastWrittenMode
.ShareFileUploadRangeOptions
setOffset(Long offset)
Sets the offset to start writing data at.ShareFileUploadRangeOptions
setRequestConditions(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 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
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 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
.
-
-
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
InputStream
orFlux
<ByteBuffer
>.
-
getOffset
public Long getOffset()
Gets the offset to start writing data at.- Returns:
Long
position to write at.
-
setOffset
public ShareFileUploadRangeOptions setOffset(Long offset)
Sets the offset to start writing data at.- Parameters:
offset
-Long
position 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.
-
getLastWrittenMode
public FileLastWrittenMode getLastWrittenMode()
Gets theFileLastWrittenMode
.- Returns:
- The
FileLastWrittenMode
.
-
setLastWrittenMode
public ShareFileUploadRangeOptions setLastWrittenMode(FileLastWrittenMode lastWrittenMode)
Sets theFileLastWrittenMode
.- Parameters:
lastWrittenMode
-FileLastWrittenMode
- Returns:
- The updated options.
-
-