org.fourthline.cling.model.meta
Class Icon
java.lang.Object
org.fourthline.cling.model.meta.Icon
- All Implemented Interfaces:
- Validatable
public class Icon
- extends Object
- implements Validatable
The metadata of a device icon, might include the actual image data of a local icon.
Note that validation of icons is lax on purpose, a valid Icon
might still
return null
from getMimeType()
, getWidth()
,
getHeight()
, and getDepth()
. However, getUri()
will return
a valid URI for a valid Icon
.
- Author:
- Christian Bauer
Constructor Summary |
Icon(org.seamless.util.MimeType mimeType,
int width,
int height,
int depth,
URI uri,
byte[] data)
|
Icon(String mimeType,
int width,
int height,
int depth,
File file)
|
Icon(String mimeType,
int width,
int height,
int depth,
String uri)
|
Icon(String mimeType,
int width,
int height,
int depth,
URI uri)
|
Icon(String mimeType,
int width,
int height,
int depth,
URI uri,
byte[] data)
|
Icon(String mimeType,
int width,
int height,
int depth,
URI uri,
InputStream is)
|
Icon(String mimeType,
int width,
int height,
int depth,
URI uri,
String data)
|
Icon(String mimeType,
int width,
int height,
int depth,
URL url)
|
Icon
public Icon(String mimeType,
int width,
int height,
int depth,
String uri)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
Icon
public Icon(String mimeType,
int width,
int height,
int depth,
URI uri)
Icon
public Icon(String mimeType,
int width,
int height,
int depth,
URI uri,
String data)
- Parameters:
data
- The icon bytes encoded as BinHex.
Icon
public Icon(String mimeType,
int width,
int height,
int depth,
URL url)
throws IOException
- Throws:
IOException
Icon
public Icon(String mimeType,
int width,
int height,
int depth,
URI uri,
InputStream is)
throws IOException
- Throws:
IOException
Icon
public Icon(String mimeType,
int width,
int height,
int depth,
File file)
throws IOException
- Throws:
IOException
Icon
public Icon(String mimeType,
int width,
int height,
int depth,
URI uri,
byte[] data)
Icon
public Icon(org.seamless.util.MimeType mimeType,
int width,
int height,
int depth,
URI uri,
byte[] data)
getMimeType
public org.seamless.util.MimeType getMimeType()
getWidth
public int getWidth()
getHeight
public int getHeight()
getDepth
public int getDepth()
getUri
public URI getUri()
getData
public byte[] getData()
getDevice
public Device getDevice()
validate
public List<ValidationError> validate()
- Specified by:
validate
in interface Validatable
- Returns:
- An empty
List
if all rules validated properly, otherwise, the detected errors.
deepCopy
public Icon deepCopy()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2013 4th Line GmbH, Switzerland. All Rights Reserved.