Package com.mojang.realmsclient.client
Class FileDownload
java.lang.Object
com.mojang.realmsclient.client.FileDownload
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) class
(package private) class
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
private Thread
(package private) boolean
(package private) boolean
(package private) boolean
private static final String[]
(package private) static final org.slf4j.Logger
private org.apache.http.client.methods.HttpGet
private final org.apache.http.client.config.RequestConfig
(package private) File
private File
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
long
contentLength
(String pUri) void
download
(WorldDownload pDownload, String pWorldName, RealmsDownloadLatestWorldScreen.DownloadStatus pStatus, LevelStorageSource pSource) static String
findAvailableFolderName
(String pFolderName) Modifies a folder name to make sure it is valid to store on disk.boolean
isError()
boolean
boolean
(package private) void
untarGzipArchive
(String pWorldName, File pTempFile, LevelStorageSource pLevelStorageSource)
-
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
-
resourcePackPath
-
request
@Nullable private volatile org.apache.http.client.methods.HttpGet request -
currentThread
-
requestConfig
private final org.apache.http.client.config.RequestConfig requestConfig -
INVALID_FILE_NAMES
-
-
Constructor Details
-
FileDownload
public FileDownload()
-
-
Method Details
-
contentLength
-
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
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
-