public final enum

OpenMode

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ net.schmizz.sshj.sftp.OpenMode

Summary

Enum Values
OpenMode  APPEND  Force all writes to append data at the end of the file. 
OpenMode  CREAT  If this flag is specified, then a new file will be created if one does not already exist (if TRUNC is specified, the new file will be truncated to zero length if it previously exists). 
OpenMode  EXCL  Causes the request to fail if the named file already exists. 
OpenMode  READ  Open the file for reading. 
OpenMode  TRUNC  Forces an existing file with the same name to be truncated to zero length when creating a file by specifying CREAT
OpenMode  WRITE  Open the file for writing. 
Fields
private final int pflag
[Expand]
Inherited Fields
From class java.lang.Enum
Public Methods
static int toMask(Set<OpenMode> modes)
static OpenMode valueOf(String name)
final static OpenMode[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final OpenMode APPEND

Force all writes to append data at the end of the file.

public static final OpenMode CREAT

If this flag is specified, then a new file will be created if one does not already exist (if TRUNC is specified, the new file will be truncated to zero length if it previously exists).

public static final OpenMode EXCL

Causes the request to fail if the named file already exists. CREAT MUST also be specified if this flag is used.

public static final OpenMode READ

Open the file for reading.

public static final OpenMode TRUNC

Forces an existing file with the same name to be truncated to zero length when creating a file by specifying CREAT. CREAT MUST also be specified if this flag is used.

public static final OpenMode WRITE

Open the file for writing. If both this and READ are specified, the file is opened for both reading and writing.

Fields

private final int pflag

Public Methods

public static int toMask (Set<OpenMode> modes)

Parameters
modes

public static OpenMode valueOf (String name)

Parameters
name

public static final OpenMode[] values ()