Class OverwriteMode

java.lang.Object
com.adaptris.filesystem.smbj.OverwriteMode
All Implemented Interfaces:
WriteMode

@ComponentProfile(summary="Open the (or create a new) file and overwrite it") public class OverwriteMode extends Object implements WriteMode
Mode which appends to an existing file if it exists.

Uses SMB2CreateDisposition#FILE_OVERWRITE_IF to open the file.

In the adapter configuration file this class is aliased as smb-overwrite-mode which is the preferred alternative to the fully qualified classname when building your configuration.

  • Constructor Details

    • OverwriteMode

      public OverwriteMode()
  • Method Details

    • fileOpenMode

      public com.hierynomus.mssmb2.SMB2CreateDisposition fileOpenMode()
      Description copied from interface: WriteMode
      What's the mode for opening the file.
      Specified by:
      fileOpenMode in interface WriteMode
      Returns:
      one of (probably) FILE_CREATE, FILE_OPEN_IF, FILE_OVERWRITE_IT depend on the type of operation you want to do.
    • getOutputStream

      public OutputStream getOutputStream(com.hierynomus.smbj.share.File smbFile)
      Specified by:
      getOutputStream in interface WriteMode