Class ShareFileUploadOptions
- java.lang.Object
-
- com.azure.storage.file.share.models.ShareFileUploadOptions
-
public final class ShareFileUploadOptions extends Object
Extended options that may be passed when uploading a file range.
-
-
Constructor Summary
Constructors Constructor Description ShareFileUploadOptions(InputStream dataStream)
Constructs a newFileParallelUploadOptions
.ShareFileUploadOptions(InputStream dataStream, long length)
Deprecated.length is no longer necessary; useShareFileUploadOptions(InputStream)
instead.ShareFileUploadOptions(Flux<ByteBuffer> dataFlux)
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.Long
getLength()
Long
getOffset()
Gets the offset to start writing data at.ParallelTransferOptions
getParallelTransferOptions()
Gets theParallelTransferOptions
.ShareRequestConditions
getRequestConditions()
Gets theShareRequestConditions
.ShareFileUploadOptions
setOffset(Long offset)
Sets the offset to start writing data at.ShareFileUploadOptions
setParallelTransferOptions(ParallelTransferOptions parallelTransferOptions)
Sets theParallelTransferOptions
.ShareFileUploadOptions
setRequestConditions(ShareRequestConditions requestConditions)
Sets theShareRequestConditions
.
-
-
-
Constructor Detail
-
ShareFileUploadOptions
public ShareFileUploadOptions(Flux<ByteBuffer> dataFlux)
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 public ShareFileUploadOptions(InputStream dataStream, long length)
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
public ShareFileUploadOptions(InputStream dataStream)
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 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 ShareFileUploadOptions setOffset(Long offset)
Sets the offset to start writing data at.- Parameters:
offset
-Long
position to write at.- Returns:
- The updated options.
-
getParallelTransferOptions
public ParallelTransferOptions getParallelTransferOptions()
Gets theParallelTransferOptions
.- Returns:
ParallelTransferOptions
-
setParallelTransferOptions
public ShareFileUploadOptions setParallelTransferOptions(ParallelTransferOptions parallelTransferOptions)
Sets theParallelTransferOptions
.- Parameters:
parallelTransferOptions
-ParallelTransferOptions
- Returns:
- The updated options.
-
getRequestConditions
public ShareRequestConditions getRequestConditions()
Gets theShareRequestConditions
.- Returns:
ShareRequestConditions
-
setRequestConditions
public ShareFileUploadOptions setRequestConditions(ShareRequestConditions requestConditions)
Sets theShareRequestConditions
.- Parameters:
requestConditions
-ShareRequestConditions
- Returns:
- The updated options.
-
-