public class DbxThumbnailFormat
extends java.lang.Object
DbxClientV1.getThumbnail(com.dropbox.core.v1.DbxThumbnailSize, com.dropbox.core.v1.DbxThumbnailFormat, java.lang.String, java.lang.String, java.io.OutputStream)
.Modifier and Type | Field and Description |
---|---|
java.lang.String |
ident |
static DbxThumbnailFormat |
JPEG
JPEG format, preferred over PNG for photographic images.
|
static DbxThumbnailFormat |
PNG
PNG format, preferred over JPEG for non-photographic images, such as
screenshots and digital art.
|
Constructor and Description |
---|
DbxThumbnailFormat(java.lang.String ident) |
Modifier and Type | Method and Description |
---|---|
static DbxThumbnailFormat |
bestForFileName(java.lang.String fileName,
DbxThumbnailFormat fallback)
Try and guess the right
DbxThumbnailFormat to use based on the image's file
name. |
public final java.lang.String ident
public static final DbxThumbnailFormat JPEG
public static final DbxThumbnailFormat PNG
public static DbxThumbnailFormat bestForFileName(java.lang.String fileName, DbxThumbnailFormat fallback)
DbxThumbnailFormat
to use based on the image's file
name. Sometimes this function won't be able to guess and will just return whatever you
pass in for fallback
.
DbxThumbnailFormat.bestForFileName("test.png"); // returns DbxThumbnailFormat.PNG DbxThumbnailFormat.bestForFileName("/stuff/funny.GIF"); // returns DbxThumbnailFormat.PNG DbxThumbnailFormat.bestForFileName("/family.jpg"); // returns DbxThumbnailFormat.JPEG