|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.util.text.LocalizedPropertiesLoader
public class LocalizedPropertiesLoader
An object that loads a properties file from the provided input stream or reader. This class reads the property file exactly like java.util.Properties, except that it also allows the files to use an encoding other than ISO-8859-1 and all non-ASCII characters are read correctly using the given encoding. In short, non-latin characters no longer need to be quoted using native2ascii.
Constructor Summary | |
---|---|
LocalizedPropertiesLoader(InputStream ins)
Creates a new loader that will load the properties from the given input stream using the default character encoding. |
|
LocalizedPropertiesLoader(InputStream ins,
String encoding)
Creates a new loader that will load the properties from the given input stream using the provided character encoding. |
|
LocalizedPropertiesLoader(Reader reader)
Creates a new loader that will load the properties from the given reader. |
Method Summary | |
---|---|
void |
load(Map properties)
Read the properties from the provided stream and store them into the given map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalizedPropertiesLoader(InputStream ins)
ins
- the input stream to load the properties frompublic LocalizedPropertiesLoader(InputStream ins, String encoding) throws UnsupportedEncodingException
ins
- the input stream to load the properties fromencoding
- the character encoding the be used when reading from the
stream
UnsupportedEncodingException
- if the name of the encoding cannot be recognizedpublic LocalizedPropertiesLoader(Reader reader)
reader
- the Reader to load the properties fromMethod Detail |
---|
public void load(Map properties) throws IOException
properties
- the map where the properties will be stored
IOException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |