Enum Class StorageMode

java.lang.Object
java.lang.Enum<StorageMode>
com.frostwire.jlibtorrent.StorageMode
All Implemented Interfaces:
Serializable, Comparable<StorageMode>, Constable

public enum StorageMode extends Enum<StorageMode>
Types of storage allocation used for AddTorrentParams.storageMode(StorageMode).
  • Enum Constant Details

    • STORAGE_MODE_ALLOCATE

      public static final StorageMode STORAGE_MODE_ALLOCATE
      All pieces will be written to their final position, all files will be allocated in full when the torrent is first started. This is done with fallocate() and similar calls. This mode minimizes fragmentation.
    • STORAGE_MODE_SPARSE

      public static final StorageMode STORAGE_MODE_SPARSE
      All pieces will be written to the place where they belong and sparse files will be used. This is the recommended, and default mode.
    • UNKNOWN

      public static final StorageMode UNKNOWN
  • Method Details

    • values

      public static StorageMode[] 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 StorageMode 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
    • swig

      public int swig()
      Returns:
      the native value
    • fromSwig

      public static StorageMode fromSwig(int swigValue)
      Parameters:
      swigValue - the native value
      Returns:
      the java enum