Package org.jupnp.model.meta
Klasse Icon
java.lang.Object
org.jupnp.model.meta.Icon
- Alle implementierten Schnittstellen:
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.
- Autor:
- Christian Bauer, Jochen Hiller - use SpecificationViolationReporter
-
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungUse this constructor if your local icon data can be resolved with aFile, the file's name must be unique within the scope of a device.Use this constructor if your local icon data is in abyte[].Icon(String mimeType, int width, int height, int depth, String uniqueName, InputStream is) Use this constructor if your local icon data is anInputStream.Use this constructor if your local icon is binary data encoded with BinHex.Used internally by jUPnP whenRemoteDeviceis discovered, you shouldn't have to call this.Use this constructor if your local icon data can be resolved on the classpath, for example:MyClass.class.getResource("/my/icon.png)protected -
Methodenübersicht
-
Konstruktordetails
-
Icon
Used internally by jUPnP whenRemoteDeviceis discovered, you shouldn't have to call this. -
Icon
Use this constructor if your local icon data can be resolved on the classpath, for example:MyClass.class.getResource("/my/icon.png)- Parameter:
url- A URL of the icon data that can be read withnew File(url.toURI()).- Löst aus:
IOException
-
Icon
Use this constructor if your local icon data can be resolved with aFile, the file's name must be unique within the scope of a device.- Löst aus:
IOException
-
Icon
public Icon(String mimeType, int width, int height, int depth, String uniqueName, InputStream is) throws IOException Use this constructor if your local icon data is anInputStream.- Parameter:
uniqueName- Must be a valid URI path segment and unique within the scope of a device.- Löst aus:
IOException
-
Icon
Use this constructor if your local icon data is in abyte[].- Parameter:
uniqueName- Must be a valid URI path segment and unique within the scope of a device.
-
Icon
public Icon(String mimeType, int width, int height, int depth, String uniqueName, String binHexEncoded) Use this constructor if your local icon is binary data encoded with BinHex.- Parameter:
uniqueName- Must be a valid URI path segment and unique within the scope of a device.binHexEncoded- The icon bytes encoded as BinHex.
-
Icon
-
-
Methodendetails
-
getMimeType
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getDepth
public int getDepth() -
getUri
-
getData
public byte[] getData() -
getDevice
-
validate
- Angegeben von:
validatein SchnittstelleValidatable- Gibt zurück:
- An empty
Listif all rules validated properly, otherwise, the detected errors.
-
deepCopy
-
toString
-