|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<OpenMode>
net.schmizz.sshj.sftp.OpenMode
public enum OpenMode
Enum Constant Summary | |
---|---|
APPEND
Force all writes to append data at the end of the file. |
|
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). |
|
EXCL
Causes the request to fail if the named file already exists. |
|
READ
Open the file for reading. |
|
TRUNC
Forces an existing file with the same name to be truncated to zero length when creating a file by specifying CREAT . |
|
WRITE
Open the file for writing. |
Method Summary | |
---|---|
static int |
toMask(Set<OpenMode> modes)
|
static OpenMode |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static OpenMode[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final OpenMode READ
public static final OpenMode WRITE
READ
are specified, the file is opened for both
reading and writing.
public static final OpenMode APPEND
public static final OpenMode CREAT
TRUNC
is specified, the new file will be truncated to zero length if it previously exists).
public static final OpenMode TRUNC
CREAT
. CREAT
MUST also be specified if this flag is used.
public static final OpenMode EXCL
CREAT
MUST also be specified if
this flag is used.
Method Detail |
---|
public static OpenMode[] values()
for (OpenMode c : OpenMode.values()) System.out.println(c);
public static OpenMode valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static int toMask(Set<OpenMode> modes)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |