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 uri)
    • download

      public void download(WorldDownload download, String worldName, RealmsDownloadLatestWorldScreen.DownloadStatus status, LevelStorageSource source)
    • cancel

      public void cancel()
    • isFinished

      public boolean isFinished()
    • isError

      public boolean isError()
    • isExtracting

      public boolean isExtracting()
    • findAvailableFolderName

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

      void untarGzipArchive(String worldName, @Nullable File tempFile, LevelStorageSource levelStorageSource) throws IOException
      Throws:
      IOException