Class Media
- java.lang.Object
-
- rocks.xmpp.extensions.data.mediaelement.model.Media
-
public final class Media extends Object
The implementation of the<media/>element in theurn:xmpp:media-elementnamespace.This class is immutable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMedia.LocationSpecifies the out-of-band location of the media data.
-
Constructor Summary
Constructors Constructor Description Media(int width, int height, Media.Location... locations)Creates a media object with a location.Media(Media.Location... locations)Creates a media object with a location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)intgetHeight()If the media is an image or video, gets the recommended display height of the image.List<Media.Location>getLocations()Gets the locations to the media.intgetWidth()If the media is an image or video, gets the recommended display width of the image.inthashCode()
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
urn:xmpp:media-element- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Media
public Media(Media.Location... locations)
Creates a media object with a location.- Parameters:
locations- The location.
-
Media
public Media(int width, int height, Media.Location... locations)Creates a media object with a location.- Parameters:
width- The width.height- The height.locations- The location.
-
-
Method Detail
-
getLocations
public final List<Media.Location> getLocations()
Gets the locations to the media.- Returns:
- The locations.
-
getHeight
public final int getHeight()
If the media is an image or video, gets the recommended display height of the image.- Returns:
- The height.
-
getWidth
public final int getWidth()
If the media is an image or video, gets the recommended display width of the image.- Returns:
- The width.
-
-