public class DropboxV2 extends Object implements DropboxAdapter
| Modifier and Type | Method and Description |
|---|---|
boolean |
changeWorkingDirectory(String relativePath) |
void |
cleanWorkingFolder() |
boolean |
connect() |
static Secret |
convertAuthorizationToAccessCode(Secret secretAuthorizationCode) |
static com.google.gson.Gson |
createGson() |
boolean |
disconnect() |
int |
getTimeout() |
boolean |
isConnected() |
FolderMetadata |
makeDirectory(String path) |
void |
pruneFolder(String path,
int pruneRootDays) |
void |
setTimeout(int timeout)
Change the timeout value, values lower then 1000 are ignored and reset to default.
|
void |
storeFile(String name,
InputStream content,
long length) |
public DropboxV2(String accessToken)
public static com.google.gson.Gson createGson()
public void setTimeout(int timeout)
setTimeout in interface DropboxAdaptertimeout - timeout in milisecondspublic int getTimeout()
getTimeout in interface DropboxAdapterpublic boolean connect()
throws RestException
connect in interface DropboxAdapterRestExceptionpublic boolean isConnected()
isConnected in interface DropboxAdapterpublic boolean disconnect()
disconnect in interface DropboxAdapterpublic boolean changeWorkingDirectory(@Nonnull String relativePath) throws RestException
changeWorkingDirectory in interface DropboxAdapterRestExceptionpublic FolderMetadata makeDirectory(@Nonnull String path) throws RestException
makeDirectory in interface DropboxAdapterRestExceptionpublic void cleanWorkingFolder()
throws RestException
cleanWorkingFolder in interface DropboxAdapterRestExceptionpublic void pruneFolder(@Nonnull String path, int pruneRootDays) throws RestException
pruneFolder in interface DropboxAdapterRestExceptionpublic void storeFile(@Nonnull String name, @Nonnull InputStream content, long length) throws RestException
storeFile in interface DropboxAdaptername - name of the new file to store the content incontent - data stream of the contentlength - content size in bytesRestExceptionpublic static Secret convertAuthorizationToAccessCode(Secret secretAuthorizationCode) throws RestException
RestExceptionCopyright © 2016–2021. All rights reserved.