org.apache.wicket.resource
Class UtfPropertiesFilePropertiesLoader

java.lang.Object
  extended by org.apache.wicket.resource.UtfPropertiesFilePropertiesLoader
All Implemented Interfaces:
IPropertiesLoader

public class UtfPropertiesFilePropertiesLoader
extends java.lang.Object
implements IPropertiesLoader

Load properties from properties file via a Reader, which allows to provide the charset and thus the encoding can be different than ISO 8859-1. The implementation depends on the Java 6 Properties implementation and is disable if the reflection cannot find the method load(Reader).

Author:
Juergen Donnerstag

Constructor Summary
UtfPropertiesFilePropertiesLoader(java.lang.String fileExtension, java.lang.String encoding)
          Construct.
 
Method Summary
 java.lang.String getFileExtension()
           
 java.util.Properties loadJavaProperties(java.io.InputStream in)
          Load the properties into a java.util.Properties object
 ValueMap loadWicketProperties(java.io.InputStream inputStream)
          Load the properties into a ValueMap.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UtfPropertiesFilePropertiesLoader

public UtfPropertiesFilePropertiesLoader(java.lang.String fileExtension,
                                         java.lang.String encoding)
Construct.

Parameters:
fileExtension -
encoding -
Method Detail

getFileExtension

public final java.lang.String getFileExtension()
Specified by:
getFileExtension in interface IPropertiesLoader
Returns:
The file extension this loader should be applied to
See Also:
IPropertiesLoader.getFileExtension()

loadJavaProperties

public java.util.Properties loadJavaProperties(java.io.InputStream in)
                                        throws java.io.IOException
Description copied from interface: IPropertiesLoader
Load the properties into a java.util.Properties object

Specified by:
loadJavaProperties in interface IPropertiesLoader
Returns:
Properties. Null if not applicable or not found or ...
Throws:
java.io.IOException
See Also:
IPropertiesLoader.loadJavaProperties(java.io.InputStream)

loadWicketProperties

public ValueMap loadWicketProperties(java.io.InputStream inputStream)
Description copied from interface: IPropertiesLoader
Load the properties into a ValueMap.

Specified by:
loadWicketProperties in interface IPropertiesLoader
Returns:
Properties. Null if not applicable or not found or ...
See Also:
IPropertiesLoader.loadWicketProperties(java.io.InputStream)


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.