Package ui.common

Klasse Convenience

java.lang.Object
ui.common.Convenience

public class Convenience extends Object
Automation for the Player.
Autor:
Ken Händel
  • Felddetails

    • TOP_LEVEL_FIRST_COMPARATOR

      public static final Comparator<? super File> TOP_LEVEL_FIRST_COMPARATOR
    • NUVIE_PLAYER_PRG

      private static final String NUVIE_PLAYER_PRG
      NUVIE video player
      Siehe auch:
    • NUVIE_PLAYER

      private static byte[] NUVIE_PLAYER
    • LOGGER

      private static final Logger LOGGER
    • MACOSX

      public static final String MACOSX
      Useless Apple directory.
      Siehe auch:
    • UUID_FILE_FILTER

      private static final UUIDFileFilter UUID_FILE_FILTER
    • TUNE_FILE_FILTER

      private static final TuneFileFilter TUNE_FILE_FILTER
    • DISK_FILE_FILTER

      private static final DiskFileFilter DISK_FILE_FILTER
    • TAPE_FILE_FILTER

      private static final TapeFileFilter TAPE_FILE_FILTER
    • CART_FILE_FILTER

      private static final CartFileFilter CART_FILE_FILTER
    • LEXICALLY_FIRST_MEDIA

      public static final BiPredicate<File,File> LEXICALLY_FIRST_MEDIA
      Magically chooses files to be attached, rules are: Attach first supported file, eventually replace by lexically first disk or tape (e.g. side A, not B).
    • NO_MEDIA

      public static final BiPredicate<File,File> NO_MEDIA
    • LOAD_8_1_RUN

      private static final String LOAD_8_1_RUN
      Auto-start commands.
      Siehe auch:
    • LOAD_RUN

      private static final String LOAD_RUN
      Auto-start commands.
      Siehe auch:
    • player

      private Player player
    • deleteOutdatedTempDirectoriesHook

      private static Thread deleteOutdatedTempDirectoriesHook
  • Konstruktordetails

    • Convenience

      public Convenience(Player player)
  • Methodendetails

    • autostart

      public ConvenienceResult autostart(File file, BiPredicate<File,File> isMediaToAttach, String dirEntry) throws IOException, SidTuneError
      Löst aus:
      IOException
      SidTuneError
    • autostart

      public ConvenienceResult autostart(File file, BiPredicate<File,File> isMediaToAttach, String dirEntry, boolean deepScan) throws IOException, SidTuneError
      Auto-start C64 bundle (ZIP containing well-known formats or un-zipped entry). Attach specific disk/tape/cartridge and automatically start entry.
      Note: temporary files are removed or marked to be removed on exit.
      Parameter:
      file - file to open
      isMediaToAttach - tester for media to attach
      dirEntry - if media to attach is a disk this directory entry is loaded after attaching the media (null means load first file on disk).
      deepScan - scan sub-directories and attach cartridges
      Löst aus:
      IOException - image read error
      SidTuneError - invalid tune
    • getToAttach

      private File getToAttach(ConvenienceResult result, File dir, File file, BiPredicate<File,File> mediaTester, File toAttach, boolean canAttachCartridge)
      Get media file to attach, search recursively.
      Note: all files and folders are marked to be deleted.
      Parameter:
      dir - directory where the files are located
      file - file to get traversed and searched for media
      mediaTester - predicate to check desired media
      toAttach - current media to attach
      Gibt zurück:
      media to attach
    • isSupportedMedia

      public boolean isSupportedMedia(File file)
      Check well-known disk/tape/cartridge file extension
      Parameter:
      file - file to check
      Gibt zurück:
      is it a well-known format
    • deleteOutdatedTempDirectories

      private void deleteOutdatedTempDirectories()