Don't call {@code close()} directly on the {@link #body}. Instead call either call either {@link #finish} or {@link #close} to make sure the stream and otherresources are released. A safe idiom is to use the object within a {@code try}block and put a call to {@link #close()} in the {@code finally} block.
DbxClient.Uploader uploader = ... try { uploader.body.write("Hello, world!".getBytes("UTF-8")); uploader.finish(); } finally { uploader.close(); }
|
|
|
|
|
|
|
|