public static final class DbxStreamWriter.InputStreamCopier extends DbxStreamWriter<IOException>
DbxStreamWriter
that gets its source data from the given InputStream
.
The InputStream
will be closed automatically.DbxStreamWriter.InputStreamCopier
Constructor and Description |
---|
DbxStreamWriter.InputStreamCopier(InputStream source) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Called when we're done with this object.
|
void |
write(NoThrowOutputStream out)
Write all the data you plan to write to
out . |
public DbxStreamWriter.InputStreamCopier(InputStream source)
public void write(NoThrowOutputStream out) throws IOException
DbxStreamWriter
out
. Do not
call close()
on the stream (the stream will
be closed automatically).write
in class DbxStreamWriter<IOException>
IOException
public void close()
DbxStreamWriter
For example, DbxClient.uploadFile(java.lang.String, com.dropbox.core.DbxWriteMode, long, java.io.InputStream)
will call close()
whether
the upload succeeds or not. DbxStreamWriter.InputStreamCopier
uses
this method to close the underlying InputStream
.
close
in class DbxStreamWriter<IOException>
Copyright © 2013. All rights reserved.