Package net.minecraft.client.realms
Class FileDownload
java.lang.Object
net.minecraft.client.realms.FileDownload
@Environment(CLIENT) public class FileDownload extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classFileDownload.DownloadCountingOutputStream(package private) classFileDownload.ProgressListener(package private) classFileDownload.ResourcePackProgressListener -
Field Summary
Fields Modifier and Type Field Description private FilebackupFileprivate booleancancelledprivate ThreadcurrentThreadprivate booleanerrorprivate booleanextractingprivate booleanfinishedprivate org.apache.http.client.methods.HttpGethttpRequestprivate static String[]INVALID_FILE_NAMESprivate static LoggerLOGGERprivate org.apache.http.client.config.RequestConfigrequestConfigprivate FileresourcePackPath -
Constructor Summary
Constructors Constructor Description FileDownload() -
Method Summary
Modifier and Type Method Description voidcancel()longcontentLength(String downloadLink)voiddownloadWorld(WorldDownload download, String message, RealmsDownloadLatestWorldScreen.DownloadStatus status, LevelStorage storage)static StringfindAvailableFolderName(String folder)booleanisError()booleanisExtracting()booleanisFinished()private static voidreadNbtFile(File file)private voiduntarGzipArchive(String name, File archive, LevelStorage storage)
-
Field Details
-
LOGGER
-
INVALID_FILE_NAMES
-
cancelled
private volatile boolean cancelled -
finished
private volatile boolean finished -
error
private volatile boolean error -
extracting
private volatile boolean extracting -
backupFile
-
resourcePackPath
-
httpRequest
private volatile org.apache.http.client.methods.HttpGet httpRequest -
currentThread
-
requestConfig
private final org.apache.http.client.config.RequestConfig requestConfig
-
-
Constructor Details
-
FileDownload
public FileDownload()
-
-
Method Details
-
contentLength
-
downloadWorld
public void downloadWorld(WorldDownload download, String message, RealmsDownloadLatestWorldScreen.DownloadStatus status, LevelStorage storage) -
cancel
public void cancel() -
isFinished
public boolean isFinished() -
isError
public boolean isError() -
isExtracting
public boolean isExtracting() -
findAvailableFolderName
-
untarGzipArchive
- Throws:
IOException
-
readNbtFile
-