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

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

public class JXCSkinDirSource
extends AbstractJXCSkinSource

A JXCSkinSource that loads from files.


Field Summary
private  java.io.File dir
          The base directory.
 
Constructor Summary
JXCSkinDirSource(java.io.File dir)
          Create a new instance.
 
Method Summary
 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

dir

@NotNull
private final java.io.File dir
The base directory.

Constructor Detail

JXCSkinDirSource

public JXCSkinDirSource(@NotNull
                        java.io.File dir)
                 throws JXCSkinException
Create a new instance.

Parameters:
dir - The base directory.
Throws:
JXCSkinException - if the skin cannot be loaded
Method Detail

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