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) class
FileDownload.DownloadCountingOutputStream
(package private) class
FileDownload.ProgressListener
(package private) class
FileDownload.ResourcePackProgressListener
-
Field Summary
Fields Modifier and Type Field Description private File
backupFile
private boolean
cancelled
private Thread
currentThread
private boolean
error
private boolean
extracting
private boolean
finished
private org.apache.http.client.methods.HttpGet
httpRequest
private static String[]
INVALID_FILE_NAMES
private static Logger
LOGGER
private org.apache.http.client.config.RequestConfig
requestConfig
private File
resourcePackPath
-
Constructor Summary
Constructors Constructor Description FileDownload()
-
Method Summary
Modifier and Type Method Description void
cancel()
long
contentLength(String downloadLink)
void
downloadWorld(WorldDownload download, String message, RealmsDownloadLatestWorldScreen.DownloadStatus status, LevelStorage storage)
static String
findAvailableFolderName(String folder)
boolean
isError()
boolean
isExtracting()
boolean
isFinished()
private static void
readNbtFile(File file)
private void
untarGzipArchive(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
-