Package com.dropbox.core.v1
Class DbxThumbnailFormat
- java.lang.Object
-
- com.dropbox.core.v1.DbxThumbnailFormat
-
public class DbxThumbnailFormat extends java.lang.Object
Thumbnail image format presets, to be used withDbxClientV1.getThumbnail(com.dropbox.core.v1.DbxThumbnailSize, com.dropbox.core.v1.DbxThumbnailFormat, java.lang.String, java.lang.String, java.io.OutputStream)
.
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description DbxThumbnailFormat(java.lang.String ident)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DbxThumbnailFormat
bestForFileName(java.lang.String fileName, DbxThumbnailFormat fallback)
Try and guess the rightDbxThumbnailFormat
to use based on the image's file name.
-
-
-
Field Detail
-
ident
public final java.lang.String ident
-
JPEG
public static final DbxThumbnailFormat JPEG
JPEG format, preferred over PNG for photographic images.
-
PNG
public static final DbxThumbnailFormat PNG
PNG format, preferred over JPEG for non-photographic images, such as screenshots and digital art.
-
-
Method Detail
-
bestForFileName
public static DbxThumbnailFormat bestForFileName(java.lang.String fileName, DbxThumbnailFormat fallback)
Try and guess the rightDbxThumbnailFormat
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 forfallback
.DbxThumbnailFormat.bestForFileName("test.png"); // returns DbxThumbnailFormat.PNG DbxThumbnailFormat.bestForFileName("/stuff/funny.GIF"); // returns DbxThumbnailFormat.PNG DbxThumbnailFormat.bestForFileName("/family.jpg"); // returns DbxThumbnailFormat.JPEG
-
-