public class DropboxService extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_APP_NAME |
static String |
DROPBOX_APPLICATION_KEY |
static String |
DROPBOX_TOKEN_KEY |
| Constructor and Description |
|---|
DropboxService() |
| Modifier and Type | Method and Description |
|---|---|
void |
assumeAvailable() |
String |
downloadFile(String dboxFilename)
download dropbox file locally
|
String |
getAccount() |
boolean |
isAvailable() |
List<com.dropbox.core.v2.files.Metadata> |
listFolder(String folderName)
list dropbox folder
|
com.dropbox.core.v2.files.FileMetadata |
uploadFile(String localFilename,
String dboxFilename)
upload local file to dropbox folder
|
public static final String DEFAULT_APP_NAME
public static final String DROPBOX_TOKEN_KEY
public static final String DROPBOX_APPLICATION_KEY
public void assumeAvailable()
public boolean isAvailable()
public String getAccount() throws com.dropbox.core.DbxException
com.dropbox.core.DbxExceptionpublic List<com.dropbox.core.v2.files.Metadata> listFolder(String folderName) throws com.dropbox.core.v2.files.ListFolderErrorException, com.dropbox.core.DbxException
folderName - com.dropbox.core.v2.files.ListFolderErrorExceptioncom.dropbox.core.DbxExceptionpublic com.dropbox.core.v2.files.FileMetadata uploadFile(String localFilename, String dboxFilename) throws FileNotFoundException, IOException, com.dropbox.core.v2.files.UploadErrorException, com.dropbox.core.DbxException
localFilename - dboxFilename - FileNotFoundExceptionIOExceptioncom.dropbox.core.v2.files.UploadErrorExceptioncom.dropbox.core.DbxExceptionpublic String downloadFile(String dboxFilename) throws IOException, com.dropbox.core.v2.files.DownloadErrorException, com.dropbox.core.DbxException
dboxFilename - IOExceptioncom.dropbox.core.v2.files.DownloadErrorExceptioncom.dropbox.core.DbxExceptionCopyright © 2016. All rights reserved.