E
- The type of exception that your write(com.dropbox.core.NoThrowOutputStream)
implementation might throw
If your write
implementation won't throw any checked exceptions,
you should use RuntimeException
for this parameter.public abstract class DbxStreamWriter<E extends Throwable> extends Object
OutputStream
, usually
in the context of an API request being made by DbxClient
.Modifier and Type | Class and Description |
---|---|
static class |
DbxStreamWriter.InputStreamCopier
A
DbxStreamWriter that gets its source data from the given InputStream . |
Constructor and Description |
---|
DbxStreamWriter() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Called when we're done with this object.
|
abstract void |
write(NoThrowOutputStream out)
Write all the data you plan to write to
out . |
public abstract void write(NoThrowOutputStream out) throws E extends Throwable
out
. Do not
call close()
on the stream (the stream will
be closed automatically).public abstract void close()
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
.
Copyright © 2013. All rights reserved.