Enum Class OpenMode

java.lang.Object
java.lang.Enum<OpenMode>
net.schmizz.sshj.sftp.OpenMode
All Implemented Interfaces:
Serializable, Comparable<OpenMode>, Constable

public enum OpenMode extends Enum<OpenMode>
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Force 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 (if TRUNC 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 specifying CREAT.
    Open the file for writing.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    OpenMode(int pflag)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
     
    static OpenMode
    Returns the enum constant of this class with the specified name.
    static OpenMode[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • READ

      public static final OpenMode READ
      Open the file for reading.
    • WRITE

      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.
    • APPEND

      public static final OpenMode APPEND
      Force all writes to append data at the end of the file.
    • CREAT

      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).
    • TRUNC

      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.
    • EXCL

      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.
  • Field Details

    • pflag

      private final int pflag
  • Constructor Details

    • OpenMode

      private OpenMode(int pflag)
  • Method Details

    • values

      public static OpenMode[] 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

      public static OpenMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toMask

      public static int toMask(Set<OpenMode> modes)