> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: PHXIcon

**Package:** `com.phoenix_int.aserver.util`

**Class Hierarchy**

```text theme={null}
↳ java.lang.Object
  ↳ com.phoenix_int.aserver.util.PHXIcon
```

***

**Declaration**

```java theme={null}
public class PHXIcon
extends java.lang.Object
```

This class provides utility functions for loading and creating an icon file.

## Constructor Summary

| Constructor and Description |
| - |
| `PHXIcon()` Creates an icon with values set to "unknown" |
| `PHXIcon(byte[] iconData, java.lang.String iconType)` |
| `PHXIcon(java.lang.String iconFileName)` |

## Method Summary

| Modifier and Type | Method and Description |
| - | - |
| `byte[]` | `getData()` Retrieves the data for the image |
| `java.lang.String` | `getIconFileName()` Gets the file name of the icon. |
| `java.net.URI` | `getIconURI()` Gets the URI of the icon. |
| `java.lang.String` | `getType()` Retrieves the type for the image |
| `java.awt.Image` | `toImage()` Converts the icon to an Image |

### Methods inherited from class java.lang.Object

`clone`, `equals`, `finalize`, `getClass`, `hashCode`, `notify`, `notifyAll`, `toString`, `wait`, `wait`, `wait`

## Constructor Detail

### PHXIcon

```java theme={null}
public PHXIcon()
```

Creates an icon with values set to "unknown".

### PHXIcon

```java theme={null}
public PHXIcon(java.lang.String iconFileName)
        throws java.io.IOException
```

**Parameters:**

* `iconFileName` - the file containing the icon

**Throws:**

* `java.io.IOException` - thrown if there is a problem opening or reading the icon file

### PHXIcon

```java theme={null}
public PHXIcon(byte[] iconData, 
               java.lang.String iconType)
```

**Parameters:**

* `iconData` - the data making up the file
* `iconType` - the data type (gif, jpg, etc)

## Method Detail

### getData

```java theme={null}
public byte[] getData()
```

Retrieves the data for the image.

**Returns:**

* the data for the image

### getType

```java theme={null}
public java.lang.String getType()
```

Retrieves the type for the image.

**Returns:**

* the type for the image

### toImage

```java theme={null}
public java.awt.Image toImage()
```

Converts the icon to an Image.

**Returns:**

* an image based solely on the data.

### getIconFileName

```java theme={null}
public java.lang.String getIconFileName()
```

Gets the file name of the icon. This will return an empty String if the file name is not available.

**Returns:**

* the file name of the icon, or null if not specified

### getIconURI

```java theme={null}
public java.net.URI getIconURI()
```

Gets the URI of the icon. If the URI is not available, this will return null.

**Returns:**

* the URI of the icon, or null if not available
