@Environment(value=CLIENT) public class FileDownload extends Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
FileDownload.DownloadCountingOutputStream |
(package private) class |
FileDownload.ProgressListener |
(package private) class |
FileDownload.ResourcePackProgressListener |
Modifier and Type | Field and 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 and Description |
---|
FileDownload() |
Modifier and Type | Method and 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) |
private static final Logger LOGGER
private static final String[] INVALID_FILE_NAMES
private volatile boolean cancelled
private volatile boolean finished
private volatile boolean error
private volatile boolean extracting
private volatile File backupFile
private volatile File resourcePackPath
private volatile org.apache.http.client.methods.HttpGet httpRequest
private Thread currentThread
private final org.apache.http.client.config.RequestConfig requestConfig
public long contentLength(String downloadLink)
public void downloadWorld(WorldDownload download, String message, RealmsDownloadLatestWorldScreen.DownloadStatus status, LevelStorage storage)
public void cancel()
public boolean isFinished()
public boolean isError()
public boolean isExtracting()
private void untarGzipArchive(String name, File archive, LevelStorage storage) throws IOException
IOException
private static void readNbtFile(File file)