Enum Class FileLoader.Format

java.lang.Object
java.lang.Enum<FileLoader.Format>
net.emustudio.emulib.io.FileLoader.Format
All Implemented Interfaces:
Serializable, Comparable<FileLoader.Format>, Constable
Enclosing class:
FileLoader

public static enum FileLoader.Format extends Enum<FileLoader.Format>
Supported file formats and their extensions.
  • Enum Constant Details

  • Method Details

    • values

      public static FileLoader.Format[] 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 FileLoader.Format 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
    • isTape

      public boolean isTape()
      Returns:
      true for TAP and TZX
    • getExtensions

      public List<String> getExtensions()
      Returns:
      file extensions without dot
    • fromPath

      public static Optional<FileLoader.Format> fromPath(Path path)
      Recognizes format by the last extension of the file name (case-insensitive).
      Parameters:
      path - file path
      Returns:
      format, or empty if the extension is unknown