Ich war angenehm überrascht, wie schnell große Dateien können hochgeladen werden. Wirklich nur eine Frage von Sekunden. Was ist jedoch viel zu langsam, das Byte -Array in eine tatsächliche Datei. Br /> Hier ist mein Code: < /p>
Code: Select all
// Get the response - this is actually quite fast
ResponseInputStream getResponse = s3Client.getObject(request);
byte[] responseBytes = getResponse.readAllBytes();
// Download to a file - this is extremely slow
File outputFile = new File(downloadPath);
try (FileOutputStream fileOutputStream = new FileOutputStream(outputFile)) {
for (int ii=0; ii