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-element
namespace.This class is immutable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Media.Location
Specifies 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 boolean
equals(Object o)
int
getHeight()
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.int
getWidth()
If the media is an image or video, gets the recommended display width of the image.int
hashCode()
-
-
-
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.
-
-