public class Media
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Media.MediaType
An enum used for defining the type of media associated with an instance of Media.
|
| Constructor and Description |
|---|
Media(byte[] media,
Media.MediaType type,
java.lang.String filename)
Construct a media object
|
Media(java.io.File media,
Media.MediaType type,
java.lang.String filename)
Construct a media object
|
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
getBytes()
Get the byte array representing the media object.
|
protected java.io.File |
getFile()
Get the File representing the media object.
|
protected java.lang.String |
getFilename()
Get the filename of the media object.
|
protected java.lang.String |
getName()
Get the name of the media type.
|
public Media(java.io.File media,
Media.MediaType type,
java.lang.String filename)
media - the media datatype - the type of objectfilename - the filename of the object. This is important for determining
the MIME type. Make sure you use the right extension for the
data, ie .jpg .avi etcpublic Media(byte[] media,
Media.MediaType type,
java.lang.String filename)
media - the media datatype - the type of objectfilename - the filename of the object. This is important for determining
the MIME type. Make sure you use the right extension for the
data, ie .jpg .avi etcprotected java.lang.String getName()
protected java.lang.String getFilename()
protected java.io.File getFile()
protected byte[] getBytes()