com.realtime.crossfire.jxclient.skin.source
Class JXCSkinClassSource

java.lang.Object
  extended by com.realtime.crossfire.jxclient.skin.source.AbstractJXCSkinSource
      extended by com.realtime.crossfire.jxclient.skin.source.JXCSkinClassSource
All Implemented Interfaces:
JXCSkinSource

public class JXCSkinClassSource
extends AbstractJXCSkinSource

A JXCSkinSource that loads via the class loader.


Field Summary
private  java.lang.String baseName
          The base resource name to prepend to all resource names.
 
Constructor Summary
JXCSkinClassSource(java.lang.String baseName)
          Create a new instance.
 
Method Summary
private  java.lang.ClassLoader getClassLoader()
          Return the ClassLoader to use.
 java.io.InputStream getInputStream(java.lang.String name)
          Returns an InputStream for a resource name.
 java.lang.String getURI(java.lang.String name)
          Returns a description of the location of a resource name.
 
Methods inherited from class com.realtime.crossfire.jxclient.skin.source.AbstractJXCSkinSource
checkAccess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

baseName

@NotNull
private final java.lang.String baseName
The base resource name to prepend to all resource names.

Constructor Detail

JXCSkinClassSource

public JXCSkinClassSource(@NotNull
                          java.lang.String baseName)
                   throws JXCSkinException
Create a new instance.

Parameters:
baseName - The base resource name to prepend to all resource names.
Throws:
JXCSkinException - if the skin cannot be loaded
Method Detail

getClassLoader

@NotNull
private java.lang.ClassLoader getClassLoader()
Return the ClassLoader to use.

Returns:
The class loader.

getInputStream

@NotNull
public java.io.InputStream getInputStream(@NotNull
                                                  java.lang.String name)
                                   throws java.io.IOException
Returns an InputStream for a resource name.

Parameters:
name - the resource name
Returns:
the input stream for the resource
Throws:
java.io.IOException - if the resource cannot be loaded

getURI

@NotNull
public java.lang.String getURI(@NotNull
                                       java.lang.String name)
Returns a description of the location of a resource name.

Parameters:
name - the resource name
Returns:
the description of the resource