Enum FileStream.Mode

java.lang.Object
java.lang.Enum<FileStream.Mode>
com.pdftools.sys.FileStream.Mode
All Implemented Interfaces:
Serializable, Comparable<FileStream.Mode>
Enclosing class:
FileStream

public static enum FileStream.Mode extends Enum<FileStream.Mode>
The file access mode.
  • Enum Constant Details

    • READ_ONLY

      public static final FileStream.Mode READ_ONLY
      Open for reading only. Invoking any of the write methods of the resulting object will cause an IOException to be thrown.
    • READ_WRITE_NEW

      public static final FileStream.Mode READ_WRITE_NEW
      Open for reading and writing. The existing file content will be deleted. If the file does not already exist then an attempt will be made to create it.
    • READ_WRITE_APPEND

      public static final FileStream.Mode READ_WRITE_APPEND
      Open for reading and writing. The newly added content will be appended to the file. If the file does not already exist then an attempt will be made to create it.
    • READ_WRITE_S

      public static final FileStream.Mode READ_WRITE_S
      Open for reading and writing. Require that every update to the file's content or metadata be written synchronously to the underlying storage device.
    • READ_WRITE_D

      public static final FileStream.Mode READ_WRITE_D
      Open for reading and writing. Require that every update to the file's content be written synchronously to the underlying storage device.
  • Method Details

    • values

      public static FileStream.Mode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static FileStream.Mode 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 name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<FileStream.Mode>