net.minecraft.client.realms

public class FileUpload

implements AutoCloseable

com.mojang.realmsclient.client.FileUpload
net.minecraft.class_4337
net.minecraft.client.realms.FileUpload

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
LOGGER
field_19550
LOGGER
private static final int
MAX_RETRIES
field_32056
MAX_ATTEMPTS
private static final String
UPLOAD_PATH
field_32057
UPLOAD_ENDPOINT
private final File
file
field_19551
file
private final long
realmId
field_19552
worldId
private final int
slotId
field_19553
slotId
private final UploadInfo
uploadInfo
field_19554
uploadInfo
private final String
sessionId
field_19555
sessionId
private final String
username
field_19556
username
private final String
clientVersion
field_19557
clientVersion
private final String
worldVersion
field_49104
worldVersion
private final UploadProgress
uploadStatus
field_19558
uploadStatus
private final HttpClient
client
field_64190
httpClient

Constructor summary

ModifierConstructor
public (File file, long worldId, int slotId, UploadInfo uploadInfo, Session session, String clientVersion, String worldVersion, UploadProgress uploadStatus)

Method summary

Modifier and TypeMethod
public void
close()
public CompletableFuture<UploadResult>
startUpload()
method_76241()
upload()
private CompletableFuture<UploadResult>
requestUpload(int currentAttempt, long fileSize)
method_20971(int arg0, long arg1)
requestUpload(int currentAttempt, long size)
private static HttpRequest$BodyPublisher
inputStreamPublisherWithSize(Supplier<InputStream> inputStreamSupplier, long fileSize)
method_76243(Supplier<InputStream> arg0, long arg1)
getPublisher(Supplier<InputStream> inputSupplier, long size)
private String
uploadCookie()
method_76244()
getCookie()
private UploadResult
handleResponse(HttpResponse<String> response)
method_20975(HttpResponse<String> arg0)
handleResponse(HttpResponse<String> response)
private boolean
shouldRetry(long retryDelaySeconds, int currentAttempt)
method_20972(long arg0, int arg1)
shouldRetry(long retryDelaySeconds, int currentAttempt)
private long
getRetryDelaySeconds(HttpResponse<?> response)
method_20974(HttpResponse<?> arg0)
getRetryDelaySeconds(HttpResponse<?> response)
private CompletionStage
lambda$requestUpload$1(int arg0, long arg1, HttpResponse arg2)
method_76242(int arg0, long arg1, HttpResponse arg2)
method_76242(int arg0, long arg1, HttpResponse response)
private InputStream
lambda$requestUpload$0()
method_76245()
method_76245()