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 TypeMethodDescriptionThis parameter is required when opening the channel to write.booleansetChunkSizeInBytes(Long chunkSizeInBytes) setFileLastWrittenMode(FileLastWrittenMode fileLastWrittenMode) setFileSize(Long fileSize) setRequestConditions(ShareRequestConditions requestConditions)
-
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()- 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
- 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
- Returns:
- The size of individual writes to the service.
-
setChunkSizeInBytes
- Parameters:
chunkSizeInBytes- The size of individual writes to the service.- Returns:
- The updated instance.
-
getRequestConditions
- Returns:
- Request conditions to be used by the resulting channel.
-
getFileLastWrittenMode
- Returns:
- The last wriiten mode to be used by the resulting channel.
-