Class ShareFileSeekableByteChannelWriteOptions

java.lang.Object
com.azure.storage.file.share.options.ShareFileSeekableByteChannelWriteOptions

public final class ShareFileSeekableByteChannelWriteOptions extends Object
Options for obtaining a SeekableByteChannel backed by an Azure Storage Share File.
  • Constructor Details

    • ShareFileSeekableByteChannelWriteOptions

      public ShareFileSeekableByteChannelWriteOptions(boolean overwriteMode)
      Options constructor.
      Parameters:
      overwriteMode - If true, 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

      public Long getFileSizeInBytes()
      This parameter is required when opening the channel to write.
      Returns:
      New size of the target file.
    • setFileSize

      public ShareFileSeekableByteChannelWriteOptions setFileSize(Long fileSize)
      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

      public Long getChunkSizeInBytes()
      Gets the size of individual writes to the service.
      Returns:
      The size of individual writes to the service.
    • setChunkSizeInBytes

      public ShareFileSeekableByteChannelWriteOptions setChunkSizeInBytes(Long chunkSizeInBytes)
      Sets the size of individual writes to the service.
      Parameters:
      chunkSizeInBytes - The size of individual writes to the service.
      Returns:
      The updated instance.
    • getRequestConditions

      public ShareRequestConditions getRequestConditions()
      Gets the request conditions to be used by the resulting channel.
      Returns:
      Request conditions to be used by the resulting channel.
    • setRequestConditions

      public ShareFileSeekableByteChannelWriteOptions setRequestConditions(ShareRequestConditions requestConditions)
      Sets the request conditions to be used by the resulting channel.
      Parameters:
      requestConditions - Request conditions to be used by the resulting channel.
      Returns:
      The updated instance.
    • getFileLastWrittenMode

      public FileLastWrittenMode 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.
    • setFileLastWrittenMode

      public ShareFileSeekableByteChannelWriteOptions setFileLastWrittenMode(FileLastWrittenMode fileLastWrittenMode)
      Sets the last written mode to be used by the resulting channel.
      Parameters:
      fileLastWrittenMode - The last written mode to be used by the resulting channel.
      Returns:
      The updated instance.