minor changes
This commit is contained in:
parent
eb3d82ac05
commit
b73ec1e44b
1 changed files with 2 additions and 2 deletions
|
@ -120,7 +120,7 @@ public class Downloader extends AppCompatActivity {
|
||||||
//System.out.println(fkey);
|
//System.out.println(fkey);
|
||||||
object = s3client.getObject(bucket, prefix+filename);
|
object = s3client.getObject(bucket, prefix+filename);
|
||||||
filesize = (object.getObjectMetadata().getContentLength())/1024;
|
filesize = (object.getObjectMetadata().getContentLength())/1024;
|
||||||
writeContentToFile(fileuri);
|
writeContentToFile(fileuri, object);
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -243,7 +243,7 @@ public class Downloader extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeContentToFile(Uri uri) throws IOException {
|
private void writeContentToFile(Uri uri, S3Object object) throws IOException {
|
||||||
try (
|
try (
|
||||||
final InputStream in = object.getObjectContent();
|
final InputStream in = object.getObjectContent();
|
||||||
final OutputStream out = getContentResolver().openOutputStream(uri);
|
final OutputStream out = getContentResolver().openOutputStream(uri);
|
||||||
|
|
Loading…
Reference in a new issue