Package net.schmizz.sshj.sftp
Enum Class OpenMode
- All Implemented Interfaces:
Serializable
,Comparable<OpenMode>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionForce all writes to append data at the end of the file.If this flag is specified, then a new file will be created if one does not already exist (ifTRUNC
is specified, the new file will be truncated to zero length if it previously exists).Causes the request to fail if the named file already exists.Open the file for reading.Forces an existing file with the same name to be truncated to zero length when creating a file by specifyingCREAT
.Open the file for writing. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Enum Constant Details
-
READ
Open the file for reading. -
WRITE
Open the file for writing. If both this andREAD
are specified, the file is opened for both reading and writing. -
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 (ifTRUNC
is specified, the new file will be truncated to zero length if it previously exists). -
TRUNC
-
EXCL
Causes the request to fail if the named file already exists.CREAT
MUST also be specified if this flag is used.
-
-
Field Details
-
pflag
private final int pflag
-
-
Constructor Details
-
OpenMode
private OpenMode(int pflag)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toMask
-