Package org.apache.sshd.sftp.client
Enum SftpClient.OpenMode
- java.lang.Object
-
- java.lang.Enum<SftpClient.OpenMode>
-
- org.apache.sshd.sftp.client.SftpClient.OpenMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SftpClient.OpenMode>
- Enclosing interface:
- SftpClient
public static enum SftpClient.OpenMode extends java.lang.Enum<SftpClient.OpenMode>
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Set<java.nio.file.OpenOption>
SUPPORTED_OPTIONS
-
Constructor Summary
Constructors Modifier Constructor Description private
OpenMode()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Set<SftpClient.OpenMode>
fromOpenOptions(java.util.Collection<? extends java.nio.file.OpenOption> options)
ConvertsStandardOpenOption
-s intoSftpClient.OpenMode
-sstatic SftpClient.OpenMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SftpClient.OpenMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Read
public static final SftpClient.OpenMode Read
-
Write
public static final SftpClient.OpenMode Write
-
Append
public static final SftpClient.OpenMode Append
-
Create
public static final SftpClient.OpenMode Create
-
Truncate
public static final SftpClient.OpenMode Truncate
-
Exclusive
public static final SftpClient.OpenMode Exclusive
-
-
Method Detail
-
values
public static SftpClient.OpenMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SftpClient.OpenMode c : SftpClient.OpenMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SftpClient.OpenMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
fromOpenOptions
public static java.util.Set<SftpClient.OpenMode> fromOpenOptions(java.util.Collection<? extends java.nio.file.OpenOption> options)
ConvertsStandardOpenOption
-s intoSftpClient.OpenMode
-s- Parameters:
options
- The original options - ignored ifnull
/empty- Returns:
- A modifiable
Set
of the equivalent modes - Throws:
java.lang.IllegalArgumentException
- If an unsupported option is requested- See Also:
SUPPORTED_OPTIONS
-
-