Package | Description |
---|---|
com.dropbox.core |
Modifier and Type | Class and Description |
---|---|
static class |
DbxException.BadRequest
This is what is thrown when the Dropbox server tells us that it didn't
like something about our request.
|
static class |
DbxException.BadResponse
Thrown when we the response from the Dropbox server isn't something we expect.
|
static class |
DbxException.BadResponseCode
Thrown when the Dropbox server responds with an HTTP status code we didn't expect.
|
static class |
DbxException.InvalidAccessToken
Gets thrown when the access token you're using to make API calls is invalid.
|
static class |
DbxException.NetworkIO
This is what gets thrown when there's an IOException when reading or writing
to the network (when communicating with the Dropbox API servers).
|
static class |
DbxException.ProtocolError
Something unexpected happened with either the request or the response.
|
static class |
DbxException.RetryLater
The server is overloaded, or you have hit a rate limit.
|
static class |
DbxException.ServerError
The server said that something went wrong on its end (HTTP 500 error code).
|
Modifier and Type | Field and Description |
---|---|
DbxException |
DbxClient.IODbxException.underlying |
Modifier and Type | Method and Description |
---|---|
static DbxException |
DbxRequestUtil.unexpectedStatus(HttpRequestor.Response response) |
Modifier and Type | Method and Description |
---|---|
long |
DbxClient.chunkedUploadAppend(String uploadId,
long uploadOffset,
byte[] data)
|
long |
DbxClient.chunkedUploadAppend(String uploadId,
long uploadOffset,
byte[] data,
int dataOffset,
int dataLength)
Append data to a chunked upload session.
|
<E extends Throwable> |
DbxClient.chunkedUploadAppend(String uploadId,
long uploadOffset,
long chunkSize,
DbxStreamWriter<E> writer)
Append a chunk of data to a chunked upload session.
|
DbxEntry.File |
DbxClient.chunkedUploadFinish(String targetPath,
DbxWriteMode writeMode,
String uploadId)
Creates a file in the user's Dropbox at the given path, with file data previously uploaded
via
DbxClient.chunkedUploadFirst(byte[]) and DbxClient.chunkedUploadAppend(java.lang.String, long, byte[]) . |
String |
DbxClient.chunkedUploadFirst(byte[] data)
Equivalent to
chunkedUploadFirst(data, 0, data.length) . |
String |
DbxClient.chunkedUploadFirst(byte[] data,
int dataOffset,
int dataLength)
Upload the first chunk of a multi-chunk upload.
|
<E extends Throwable> |
DbxClient.chunkedUploadFirst(int chunkSize,
DbxStreamWriter<E> writer)
Upload the first chunk of a multi-chunk upload.
|
DbxEntry |
DbxClient.copy(String fromPath,
String toPath)
Copy a file or folder from one path in Dropbox to another path in Dropbox.
|
DbxEntry |
DbxClient.copyFromCopyRef(String copyRef,
String toPath)
Create a file or folder at
toPath based on the given copy ref (created with
DbxClient.createCopyRef(java.lang.String) ). |
String |
DbxClient.createCopyRef(String path)
Creates and returns a "copy ref" to a file.
|
DbxEntry.Folder |
DbxClient.createFolder(String path)
Create a new folder in Dropbox.
|
String |
DbxOAuth1Upgrader.createOAuth2AccessToken(DbxOAuth1AccessToken token)
Given an existing active OAuth 1 access token, make a Dropbox API call to get a new OAuth 2
access token that represents the same user and app.
|
String |
DbxClient.createShareableUrl(String path)
Creates and returns a publicly-shareable URL to a file or folder's "preview page".
|
DbxUrlWithExpiration |
DbxClient.createTemporaryDirectUrl(String path)
Creates and returns a publicly-shareable URL to a file's contents.
|
void |
DbxClient.delete(String path)
Delete a file or folder from Dropbox.
|
void |
DbxClient.disableAccessToken()
Disable the access token that you constructed this
DbxClient
with. |
void |
DbxOAuth1Upgrader.disableOAuth1AccessToken(DbxOAuth1AccessToken token)
Tell the Dropbox API server to disable an OAuth 1 access token.
|
static <T> T |
DbxRequestUtil.doGet(DbxRequestConfig requestConfig,
String accessToken,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers,
DbxRequestUtil.ResponseHandler<T> handler) |
static <T> T |
DbxRequestUtil.doPost(DbxRequestConfig requestConfig,
String accessToken,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers,
DbxRequestUtil.ResponseHandler<T> handler) |
<T> T |
DbxClient.doPost(String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers,
DbxRequestUtil.ResponseHandler<T> handler) |
static <T> T |
DbxRequestUtil.doPostNoAuth(DbxRequestConfig requestConfig,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers,
DbxRequestUtil.ResponseHandler<T> handler) |
abstract DbxEntry.File |
DbxClient.Uploader.finish()
When you're done writing the file contents to
DbxClient.Uploader.getBody() , call this
to indicate that you're done. |
DbxAuthFinish |
DbxWebAuth.finish(Map<String,String[]> queryParams)
Call this after the user has visited the authorizaton URL and Dropbox has redirected them
back to you (using the
redirectUri you passed in to DbxWebAuth.start(java.lang.String) . |
DbxAuthFinish |
DbxWebAuthNoRedirect.finish(String code)
Call this after the user has visited the authorizaton URL and copy/pasted the authorization
code that Dropbox gave them.
|
static <T> T |
DbxRequestUtil.finishResponse(HttpRequestor.Response response,
DbxRequestUtil.ResponseHandler<T> handler) |
<E extends Throwable> |
DbxClient.finishUploadFile(DbxClient.Uploader uploader,
DbxStreamWriter<E> writer) |
DbxAccountInfo |
DbxClient.getAccountInfo()
Retrieve the user's account information.
|
DbxDelta<DbxEntry> |
DbxClient.getDelta(String cursor)
Return "delta" entries for the contents of a user's Dropbox.
|
<C> DbxDeltaC<C> |
DbxClient.getDeltaC(Collector<DbxDeltaC.Entry<DbxEntry>,C> collector,
String cursor)
A more generic version of
DbxClient.getDelta(java.lang.String) . |
<C> DbxDeltaC<C> |
DbxClient.getDeltaCWithPathPrefix(Collector<DbxDeltaC.Entry<DbxEntry>,C> collector,
String cursor,
String pathPrefix)
A more generic version of
DbxClient.getDeltaWithPathPrefix(java.lang.String, java.lang.String) . |
DbxDelta<DbxEntry> |
DbxClient.getDeltaWithPathPrefix(String cursor,
String pathPrefix)
Same as
DbxClient.getDelta(java.lang.String) , except results are limited to files and folders whose
paths are equal to or under the specified pathPrefix . |
DbxEntry.File |
DbxClient.getFile(String path,
String rev,
OutputStream target)
Retrieves a file's content and writes it to the given
OutputStream . |
static String |
DbxRequestUtil.getFirstHeader(HttpRequestor.Response response,
String name) |
static String |
DbxRequestUtil.getFirstHeaderMaybe(HttpRequestor.Response response,
String name) |
DbxEntry |
DbxClient.getMetadata(String path)
Get the file or folder metadata for a given path.
|
DbxEntry.WithChildren |
DbxClient.getMetadataWithChildren(String path)
Get the metadata for a given path; if the path refers to a folder,
get all the children's metadata as well.
|
<C> DbxEntry.WithChildrenC<C> |
DbxClient.getMetadataWithChildrenC(String path,
Collector<DbxEntry,? extends C> collector)
Same as
DbxClient.getMetadataWithChildren(java.lang.String) except instead of always returning a list of
DbxEntry objects, you specify a Collector that processes the DbxEntry
objects one by one and aggregates them however you want. |
Maybe<DbxEntry.WithChildren> |
DbxClient.getMetadataWithChildrenIfChanged(String path,
String previousFolderHash)
Get the metadata for a given path and its children if anything has
changed since the last time you got them (as determined by the value
of
DbxEntry.WithChildren.hash from the last result). |
<C> Maybe<DbxEntry.WithChildrenC<C>> |
DbxClient.getMetadataWithChildrenIfChangedC(String path,
String previousFolderHash,
Collector<DbxEntry,? extends C> collector)
Same as
DbxClient.getMetadataWithChildrenIfChanged(java.lang.String, java.lang.String) except instead of always returning a list of
DbxEntry objects, you specify a Collector that processes the DbxEntry
objects one by one and aggregates them however you want. |
List<DbxEntry.File> |
DbxClient.getRevisions(String path)
Gets the metadata for the current and past revisions of a file (up to some limit) at
a given path.
|
DbxEntry.File |
DbxClient.getThumbnail(DbxThumbnailSize sizeBound,
DbxThumbnailFormat format,
String path,
String rev,
OutputStream target)
Downloads a thumbnail for the image file at the given path in Dropbox.
|
abstract T |
DbxRequestUtil.ResponseHandler.handle(HttpRequestor.Response response) |
DbxEntry |
DbxClient.move(String fromPath,
String toPath)
Move a file or folder from one path in Dropbox to another path in Dropbox.
|
DbxEntry.File |
DbxClient.restoreFile(String path,
String rev)
Takes a copy of the file at the given revision and saves it over the current latest copy.
|
abstract T |
DbxRequestUtil.RequestMaker.run() |
static <T,E extends Throwable> |
DbxRequestUtil.runAndRetry(int maxTries,
DbxRequestUtil.RequestMaker<T,E> requestMaker) |
List<DbxEntry> |
DbxClient.searchFileAndFolderNames(String basePath,
String query)
Returns metadata for all files and folders whose name matches the query string.
|
DbxClient.Downloader |
DbxClient.startGetFile(String path,
String rev)
Retrieve a file's content and content metadata.
|
DbxClient.Downloader |
DbxClient.startGetThumbnail(DbxThumbnailSize sizeBound,
DbxThumbnailFormat format,
String path,
String rev)
Similar to
DbxClient.getThumbnail(com.dropbox.core.DbxThumbnailSize, com.dropbox.core.DbxThumbnailFormat, java.lang.String, java.lang.String, java.io.OutputStream) , except the thumbnail contents are returned via
a DbxClient.Downloader . |
DbxClient.Uploader |
DbxClient.startUploadFile(String targetPath,
DbxWriteMode writeMode,
long numBytes)
Start an API request to upload a file to Dropbox.
|
DbxClient.Uploader |
DbxClient.startUploadFileSingle(String targetPath,
DbxWriteMode writeMode,
long numBytes)
Similar to
DbxClient.uploadFile(java.lang.String, com.dropbox.core.DbxWriteMode, long, java.io.InputStream) , except always uses the /files_put API call. |
<E extends Throwable> |
DbxClient.uploadFile(String targetPath,
DbxWriteMode writeMode,
long numBytes,
DbxStreamWriter<E> writer)
Upload file contents to Dropbox, getting contents from the given
DbxStreamWriter . |
DbxEntry.File |
DbxClient.uploadFile(String targetPath,
DbxWriteMode writeMode,
long numBytes,
InputStream contents)
A wrapper around
DbxClient.uploadFile(String, DbxWriteMode, long, DbxStreamWriter) that
lets you pass in an InputStream . |
<E extends Throwable> |
DbxClient.uploadFileChunked(int chunkSize,
String targetPath,
DbxWriteMode writeMode,
long numBytes,
DbxStreamWriter<E> writer)
Similar to
DbxClient.uploadFile(java.lang.String, com.dropbox.core.DbxWriteMode, long, java.io.InputStream) , except always uses the chunked upload API. |
<E extends Throwable> |
DbxClient.uploadFileChunked(String targetPath,
DbxWriteMode writeMode,
long numBytes,
DbxStreamWriter<E> writer)
Similar to
DbxClient.uploadFile(java.lang.String, com.dropbox.core.DbxWriteMode, long, java.io.InputStream) , except always uses the chunked upload API. |
<E extends Throwable> |
DbxClient.uploadFileSingle(String targetPath,
DbxWriteMode writeMode,
long numBytes,
DbxStreamWriter<E> writer) |
Constructor and Description |
---|
DbxClient.IODbxException(DbxException underlying) |
Copyright © 2014. All rights reserved.