Class ShareFileSeekableByteChannelWriteOptions
java.lang.Object
com.azure.storage.file.share.options.ShareFileSeekableByteChannelWriteOptions
Options for obtaining a
SeekableByteChannel
backed by an Azure Storage Share File.-
Constructor Summary
ConstructorsConstructorDescriptionShareFileSeekableByteChannelWriteOptions
(boolean overwriteMode) Options constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the size of individual writes to the service.Gets the last written mode to be used by the resulting channel.This parameter is required when opening the channel to write.Gets the request conditions to be used by the resulting channel.boolean
Gets whether the channel is in write mode.setChunkSizeInBytes
(Long chunkSizeInBytes) Sets the size of individual writes to the service.setFileLastWrittenMode
(FileLastWrittenMode fileLastWrittenMode) Sets the last written mode to be used by the resulting channel.setFileSize
(Long fileSize) Gets the size of individual writes to the service.setRequestConditions
(ShareRequestConditions requestConditions) Sets the request conditions to be used by the resulting channel.
-
Constructor Details
-
ShareFileSeekableByteChannelWriteOptions
public ShareFileSeekableByteChannelWriteOptions(boolean overwriteMode) Options constructor.- Parameters:
overwriteMode
- Iftrue
, the channel will be opened in overwrite mode. Otherwise, the channel will be opened in write mode.
-
-
Method Details
-
isOverwriteMode
public boolean isOverwriteMode()Gets whether the channel is in write mode.- Returns:
- Whether the channel is in write mode.
-
getFileSizeInBytes
This parameter is required when opening the channel to write.- Returns:
- New size of the target file.
-
setFileSize
Gets the size of individual writes to the service.- Parameters:
fileSize
- New size of the target file.- Returns:
- The updated instance.
- Throws:
UnsupportedOperationException
- When setting a file size on options that don't create a new file.
-
getChunkSizeInBytes
Gets the size of individual writes to the service.- Returns:
- The size of individual writes to the service.
-
setChunkSizeInBytes
Sets the size of individual writes to the service.- Parameters:
chunkSizeInBytes
- The size of individual writes to the service.- Returns:
- The updated instance.
-
getRequestConditions
Gets the request conditions to be used by the resulting channel.- Returns:
- Request conditions to be used by the resulting channel.
-
getFileLastWrittenMode
Gets the last written mode to be used by the resulting channel.- Returns:
- The last written mode to be used by the resulting channel.
-