Top Description Methods
org.osgi.service.upnp

public Interface UPnPIcon

Imports
java.io.IOException, .InputStream

A UPnP icon representation. Each UPnP device can contain zero or more icons.
Author
$Id: f654c000befa98e61d28be8be5e904fb4dab1b81 $

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

The color depth in bits. If the actual color depth of the icon is unknown, -1 is returned.
getDepth
()

Returns the color depth of the icon in bits.

public int

Returns:

The height in pixels, or -1 if unknown.
getHeight
()

Returns the height of the icon in pixels.

public InputStream

Returns:

An InputStream to read the icon graphics data from.
getInputStream
()

Returns an InputStream object for the icon data.

public String

Returns:

The MIME type of the encoded icon.
getMimeType
()

Returns the MIME type of the icon.

public int

Returns:

The icon size in bytes, or -1 if the size is unknown.
getSize
()

Returns the size of the icon in bytes.

public int

Returns:

The width in pixels, or -1 if unknown.
getWidth
()

Returns the width of the icon in pixels.

Method Detail

getDepthback to summary
public int getDepth()

Returns the color depth of the icon in bits.

This method must continue to return the icon depth after the UPnP device has been removed from the network.

Returns:int

The color depth in bits. If the actual color depth of the icon is unknown, -1 is returned.

getHeightback to summary
public int getHeight()

Returns the height of the icon in pixels. If the actual height of the icon is unknown, -1 is returned.

This method must continue to return the icon height after the UPnP device has been removed from the network.

Returns:int

The height in pixels, or -1 if unknown.

getInputStreamback to summary
public InputStream getInputStream() throws IOException

Returns an InputStream object for the icon data. The InputStream object provides a way for a client to read the actual icon graphics data. The number of bytes available from this InputStream object can be determined via the getSize() method. The format of the data encoded can be determined by the MIME type available via the getMimeType() method.

Returns:InputStream

An InputStream to read the icon graphics data from.

Exceptions
IOException:
If the InputStream cannot be returned.
IllegalStateException:
if the UPnP device has been removed from the network.
See Also
UPnPIcon#getMimeType()
getMimeTypeback to summary
public String getMimeType()

Returns the MIME type of the icon. This method returns the format in which the icon graphics, read from the InputStream object obtained by the getInputStream() method, is encoded.

The format of the returned string is in accordance to RFC2046. A list of valid MIME types is maintained by the IANA.

Typical values returned include: "image/jpeg" or "image/gif"

This method must continue to return the icon MIME type after the UPnP device has been removed from the network.

Returns:String

The MIME type of the encoded icon.

getSizeback to summary
public int getSize()

Returns the size of the icon in bytes. This method returns the number of bytes of the icon available to read from the InputStream object obtained by the getInputStream() method. If the actual size can not be determined, -1 is returned.

Returns:int

The icon size in bytes, or -1 if the size is unknown.

Exceptions
IllegalStateException:
if the UPnP device has been removed from the network.
getWidthback to summary
public int getWidth()

Returns the width of the icon in pixels. If the actual width of the icon is unknown, -1 is returned.

This method must continue to return the icon width after the UPnP device has been removed from the network.

Returns:int

The width in pixels, or -1 if unknown.