public abstract static class DbxClient.Uploader extends Object
getBody()
stream.
Don't call close()
directly on the getBody()
. Instead call either
call either finish()
or close()
to make sure the stream and other
resources are released. A safe idiom is to use the object within a try
block and put a call to close()
in the finally
block.
DbxClient.Uploader uploader = ... try { uploader.body.write("Hello, world!".getBytes("UTF-8")); uploader.finish(); } finally { uploader.close(); }
Constructor and Description |
---|
DbxClient.Uploader() |
Modifier and Type | Method and Description |
---|---|
abstract void |
abort()
Cancel the upload.
|
abstract void |
close()
Release the resources related to this
Uploader instance. |
abstract DbxEntry.File |
finish()
When you're done writing the file contents to
getBody() , call this
to indicate that you're done. |
abstract OutputStream |
getBody() |
public abstract OutputStream getBody()
public abstract void abort()
public abstract void close()
public abstract DbxEntry.File finish() throws DbxException
getBody()
, call this
to indicate that you're done. This will actually finish the underlying HTTP
request and return the uploaded file's DbxEntry
.DbxException
Copyright © 2014. All rights reserved.