Package com.adaptris.filesystem.smbj
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.hierynomus.mssmb2.SMB2CreateDispositionWhat's the mode for opening the file.getOutputStream(com.hierynomus.smbj.share.File smbFile)
-
Constructor Details
-
OverwriteMode
public OverwriteMode()
-
-
Method Details
-
fileOpenMode
public com.hierynomus.mssmb2.SMB2CreateDisposition fileOpenMode()Description copied from interface:WriteModeWhat's the mode for opening the file.- Specified by:
fileOpenModein interfaceWriteMode- Returns:
- one of (probably) FILE_CREATE, FILE_OPEN_IF, FILE_OVERWRITE_IT depend on the type of operation you want to do.
-