org.springframework.extensions.config.source
Class JarConfigSource

java.lang.Object
  extended by org.springframework.extensions.config.source.BaseConfigSource
      extended by org.springframework.extensions.config.source.JarConfigSource
All Implemented Interfaces:
ConfigSource

public class JarConfigSource
extends BaseConfigSource

ConfigSource implementation that gets its data via a file within a JAR file.

The location passed to the constructor should be in the default url format for referencing a file in a JAR file i.e. jar:file:/c:\lib\file.jar!/META-INF/web-client-config-custom.xml

Author:
gavinc

Field Summary
static String JAR_PATH_SEPARATOR
           
static String JAR_PROTOCOL
           
 
Constructor Summary
JarConfigSource(String location)
          Constructs a JarConfigSource
 
Method Summary
protected  InputStream getInputStream(String sourceString)
          Retrieves an InputStream to the source represented by the given source location.
 
Methods inherited from class org.springframework.extensions.config.source.BaseConfigSource
addSourceString, getConfigDeployments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAR_PROTOCOL

public static final String JAR_PROTOCOL
See Also:
Constant Field Values

JAR_PATH_SEPARATOR

public static final String JAR_PATH_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

JarConfigSource

public JarConfigSource(String location)
Constructs a JarConfigSource

Parameters:
location - The location of the file within a JAR
Method Detail

getInputStream

protected InputStream getInputStream(String sourceString)
Description copied from class: BaseConfigSource
Retrieves an InputStream to the source represented by the given source location. The meaning of the source location will depend on the implementation.

Specified by:
getInputStream in class BaseConfigSource
Parameters:
sourceString - the source location
Returns:
Returns an InputStream to the named source location


Copyright © 2009 SpringSource, Inc. All Rights Reserved.