Properties
��, ֧�ִ�Reader
�ж�ȡunicode�ַ���
@author Michael Zhou
2) Allows specifying boolean properties in the form -key. Such format is equivalent to key=true.
3) Allows importing properties from external property files by means of the special key import. E.g. specifying the property
import = a-property-file-name
results in automatically adding all properties defined in the specified property file
4) Allows declaring a property as read-only. In order to do that it is sufficient to end its key with a '!'. For example:
agentClass!=com.hp.agent.FooThe value of the property can be accessed including the '!' in the key or not indifferently
This class is designed to be usable in the restrictive J2ME CDC environment. @author Dick Cowan - HP Labs
The Extended Properties syntax is explained here:
key = value
Here is an example of a valid extended properties file:
# lines starting with # are comments # This is the simplest property key = value # A long property may be separated on multiple lines longvalue = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa # This is a property with many tokens tokens_on_a_line = first token, second token # This sequence generates exactly the same result tokens_on_multiple_lines = first token tokens_on_multiple_lines = second token # commas may be escaped in tokens commas.excaped = Hi\, what'up?
NOTE: this class has not been written for performance nor low memory usage. In fact, it's way slower than it could be and generates too much memory garbage. But since performance is not an issue during intialization (and there is not much time to improve it), I wrote it this way. If you don't like it, go ahead and tune it up! @author Stefano Mazzocchi @author Jon S. Stevens @author Dave Bryson @author Jason van Zyl @author Geir Magnusson Jr. @author Leon Messerschmidt @author Kent Johnson @author Daniel Rall @author Ilkka Priha @version $Id: ExtendedProperties.java,v 1.4 2001/05/13 21:46:22 geirm Exp $
|
|
|
|
|
|
|
|
|
|
|
|