Class ResourceHelper
Class containing constants and helper methods for obtaining resources from the resource directory. Used mainly by the views, but is also used for loading configuration files.
Inheritance
java.lang.Object
ResourceHelper
Inherited Members
java.lang.Object.clone()
java.lang.Object.equals(java.lang.Object)
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.hashCode()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.toString()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)
Namespace:
Assembly: .dll
Syntax
public final class ResourceHelper
Constructors
ResourceHelper()
Declaration
public ResourceHelper()
Fields
CSS_PATH
Declaration
public static final String CSS_PATH
Field Value
| Type | Description |
|---|---|
| java.lang.String |
IMAGE_PATH
Declaration
public static final String IMAGE_PATH
Field Value
| Type | Description |
|---|---|
| java.lang.String |
JSON_MIME_TYPE
Declaration
public static final String JSON_MIME_TYPE
Field Value
| Type | Description |
|---|---|
| java.lang.String |
MEDIA_CONTENT_TYPE
Declaration
public static final String MEDIA_CONTENT_TYPE
Field Value
| Type | Description |
|---|---|
| java.lang.String |
VISAB_DOC_PATH
Declaration
public static final String VISAB_DOC_PATH
Field Value
| Type | Description |
|---|---|
| java.lang.String |
Methods
getLogoPathByGame(String game)
Helper method that provides a specific game logo path by game name.
Declaration
public static final String getLogoPathByGame(String game)
Parameters
| Type | Name | Description |
|---|---|---|
| java.lang.String | game | the name of the game the logo is needed for. |
Returns
| Type | Description |
|---|---|
| java.lang.String | the logo path for the respective game. |
getShooterBaseIconById(String iconId)
Helper method that provides a player specific base icon. Base icon means that it is white and can be recoloured.
Declaration
public static final String getShooterBaseIconById(String iconId)
Parameters
| Type | Name | Description |
|---|---|---|
| java.lang.String | iconId | the id of the base icon needed. |
Returns
| Type | Description |
|---|---|
| java.lang.String | the base icon for the given iconId. |
readResourceContents(String path)
Reads the bytes for a resource at a given path and returns a the byte array as a UTF-8 encoded string.
Declaration
public static final String readResourceContents(String path)
Parameters
| Type | Name | Description |
|---|---|---|
| java.lang.String | path | The path to the resource |
Returns
| Type | Description |
|---|---|
| java.lang.String | The UTF-8 encoded string |