Interface DiskManagerFileInfo

    • Method Detail

      • setPriority

        void setPriority​(int p)
      • setSkipped

        void setSkipped​(boolean b)
      • setLink

        boolean setLink​(java.io.File link_destination)
        Relink the file to the destination given - this method deals with if the file is part of a simple torrent or not (so it may set the download name to keep it in sync). If you just want a simple relink, use setLinkAtomic.
        Parameters:
        link_destination -
        Returns:
        true - worked, false - failed, use getLastError to possibly get some extra info
      • setLinkAtomic

        boolean setLinkAtomic​(java.io.File link_destination)
      • getLink

        java.io.File getLink()
      • setStorageType

        boolean setStorageType​(int type,
                               boolean force)
        Parameters:
        type -
        force - discards any existing file content if it exists - use with care...
        Returns:
      • getAccessMode

        int getAccessMode()
      • getDownloaded

        long getDownloaded()
      • getLastModified

        long getLastModified()
      • getExtension

        java.lang.String getExtension()
      • getFirstPieceNumber

        int getFirstPieceNumber()
      • getLastPieceNumber

        int getLastPieceNumber()
      • getLength

        long getLength()
      • getNbPieces

        int getNbPieces()
      • getPriority

        int getPriority()
        File Download Priority
        Returns:
        Common:
        -1: Low
         0: Normal
         1: High

        Not Common:
        < -1: Lower and Lower
        >  0: Higher and Higher
      • isSkipped

        boolean isSkipped()
        Skipped files don't get downloaded.

        The state of the existing data is dependent upon getStorageType(). States ST_COMPACT and ST_REORDER_COMPACT will delete (or trim) the file. Other states will retain existing data (ie. Do Not Download).

      • exists

        boolean exists()
        Checks that the linked file exists (always returns true for pad files)
        Returns:
      • getIndex

        int getIndex()
      • getFile

        java.io.File getFile​(boolean follow_link)
      • read

        DirectByteBuffer read​(long offset,
                              int length)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • flushCache

        void flushCache()
                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getReadBytesPerSecond

        int getReadBytesPerSecond()
      • getWriteBytesPerSecond

        int getWriteBytesPerSecond()
      • getETA

        long getETA()
      • recheck

        void recheck()
      • close

        void close()
      • getLastError

        java.lang.String getLastError()