Class FileDownload

java.lang.Object
com.mojang.realmsclient.client.FileDownload

public class FileDownload extends Object
  • Field Details

    • LOGGER

      static final org.slf4j.Logger LOGGER
    • cancelled

      volatile boolean cancelled
    • finished

      volatile boolean finished
    • error

      volatile boolean error
    • extracting

      volatile boolean extracting
    • tempFile

      @Nullable private volatile File tempFile
    • resourcePackPath

      volatile File resourcePackPath
    • request

      @Nullable private volatile org.apache.http.client.methods.HttpGet request
    • currentThread

      @Nullable private Thread currentThread
    • requestConfig

      private final org.apache.http.client.config.RequestConfig requestConfig
    • INVALID_FILE_NAMES

      private static final String[] INVALID_FILE_NAMES
  • Constructor Details

    • FileDownload

      public FileDownload()
  • Method Details

    • contentLength

      public long contentLength(String pUri)
    • download

      public void download(WorldDownload pDownload, String pWorldName, RealmsDownloadLatestWorldScreen.DownloadStatus pStatus, LevelStorageSource pSource)
    • cancel

      public void cancel()
    • isFinished

      public boolean isFinished()
    • isError

      public boolean isError()
    • isExtracting

      public boolean isExtracting()
    • findAvailableFolderName

      public static String findAvailableFolderName(String pFolderName)
      Modifies a folder name to make sure it is valid to store on disk.
      Parameters:
      pFolderName - The folder name to modify
      Returns:
      the modified folder name
    • untarGzipArchive

      void untarGzipArchive(String pWorldName, @Nullable File pTempFile, LevelStorageSource pLevelStorageSource) throws IOException
      Throws:
      IOException