@ExperimentalApi public enum RequestedAvatarFormat extends Enum<RequestedAvatarFormat>
| Enum Constant and Description |
|---|
DEFAULT
This will always use the actual content type of the avatar
|
PNG
If the avatar is a PNG, or can be converted then this will use png format, otherwise it will use the actual
content type of the avatar.
|
| Modifier and Type | Method and Description |
|---|---|
abstract javax.mail.internet.ContentType |
getResponseContentType(Avatar avatar)
Gets a mime type that should be used for the avatar if requesting to read the image data in this format.
|
abstract boolean |
isSupportedBy(Avatar avatar)
Returns true if the given avatar supports this format.
|
static RequestedAvatarFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RequestedAvatarFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RequestedAvatarFormat DEFAULT
public static final RequestedAvatarFormat PNG
public static RequestedAvatarFormat[] values()
for (RequestedAvatarFormat c : RequestedAvatarFormat.values()) System.out.println(c);
public static RequestedAvatarFormat valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract javax.mail.internet.ContentType getResponseContentType(@Nonnull Avatar avatar)
isSupportedBy(Avatar) returns true then this will return the content type requested, otherwise it
will return the actual content type of the avatar.avatar - avatar that is returned in the responseRuntimeException - if the avatars content type is invalidpublic abstract boolean isSupportedBy(@Nonnull Avatar avatar)
avatar - avatar that want to see if supportedCopyright © 2002-2015 Atlassian. All Rights Reserved.