Package com.adaptris.filesystem.smbj
Class CreateMode
- java.lang.Object
-
- com.adaptris.filesystem.smbj.CreateMode
-
- All Implemented Interfaces:
WriteMode
@ComponentProfile(summary="Create the file, failing if it already exists") public class CreateMode extends java.lang.Object implements WriteMode
The default write mode which assumes that a new file will be created.Uses
SMB2CreateDisposition#FILE_CREATEwhich means that if the file already exists, the operations will fail.In the adapter configuration file this class is aliased as smb-create-mode which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description CreateMode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.hierynomus.mssmb2.SMB2CreateDispositionfileOpenMode()What's the mode for opening the file.java.io.OutputStreamgetOutputStream(com.hierynomus.smbj.share.File smbFile)
-
-
-
Method Detail
-
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.
-
getOutputStream
public java.io.OutputStream getOutputStream(com.hierynomus.smbj.share.File smbFile)
- Specified by:
getOutputStreamin interfaceWriteMode
-
-