ezvcard.parameter
Class ImageType
java.lang.Object
ezvcard.parameter.VCardParameter
ezvcard.parameter.MediaTypeParameter
ezvcard.parameter.ImageType
public class ImageType
- extends MediaTypeParameter
Represents an image media type used in the TYPE parameter, MEDIATYPE
parameter, and data URIs of the Photo
and Logo
properties.
Supported versions: 2.1, 3.0, 4.0
- Author:
- George El-Haddadt Mar 10, 2010, Michael Angstadt
Method Summary |
static Collection<ImageType> |
all()
Gets all of the parameter values that are defined as static constants in
this class. |
static ImageType |
find(String type,
String mediaType,
String extension)
Searches for a parameter value that is defined as a static constant in
this class. |
static ImageType |
get(String type,
String mediaType,
String extension)
Searches for a parameter value and creates one if it cannot be found. |
GIF
public static final ImageType GIF
JPEG
public static final ImageType JPEG
PNG
public static final ImageType PNG
find
public static ImageType find(String type,
String mediaType,
String extension)
- Searches for a parameter value that is defined as a static constant in
this class.
- Parameters:
type
- the TYPE parameter value to search for (e.g. "JPEG") or null
to not search by this valuemediaType
- the media type to search for (e.g. "image/png") or null
to not search by this valueextension
- the file extension to search for (excluding the ".",
e.g. "jpg") or null to not search by this value
- Returns:
- the object or null if not found
get
public static ImageType get(String type,
String mediaType,
String extension)
- Searches for a parameter value and creates one if it cannot be found. All
objects are guaranteed to be unique, so they can be compared with
==
equality.
- Parameters:
type
- the TYPE parameter value to search for (e.g. "JPEG") or null
to not search by this valuemediaType
- the media type to search for (e.g. "image/png") or null
to not search by this valueextension
- the file extension to search for (excluding the ".",
e.g. "jpg") or null to not search by this value
- Returns:
- the object
all
public static Collection<ImageType> all()
- Gets all of the parameter values that are defined as static constants in
this class.
- Returns:
- the parameter values
Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.