Enum SftpClient.OpenMode
- java.lang.Object
-
- java.lang.Enum<SftpClient.OpenMode>
-
- org.apache.sshd.client.subsystem.sftp.SftpClient.OpenMode
-
- All Implemented Interfaces:
Serializable
,Comparable<SftpClient.OpenMode>
- Enclosing interface:
- SftpClient
public static enum SftpClient.OpenMode extends Enum<SftpClient.OpenMode>
-
-
Field Summary
Fields Modifier and Type Field Description static Set<OpenOption>
SUPPORTED_OPTIONS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<SftpClient.OpenMode>
fromOpenOptions(Collection<? extends OpenOption> options)
ConvertsStandardOpenOption
-s intoSftpClient.OpenMode
-sstatic SftpClient.OpenMode
valueOf(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
-
-
Field Detail
-
SUPPORTED_OPTIONS
public static final Set<OpenOption> SUPPORTED_OPTIONS
-
-
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(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
fromOpenOptions
public static Set<SftpClient.OpenMode> fromOpenOptions(Collection<? extends OpenOption> options)
ConvertsStandardOpenOption
-s intoSftpClient.OpenMode
-s- Parameters:
options
- The original options - ignored ifnull
/empty- Returns:
- A
Set
of the equivalent modes - Throws:
IllegalArgumentException
- If an unsupported option is requested- See Also:
SUPPORTED_OPTIONS
-
-