- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 12 Jul 2005 14:47:57 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/aural
In directory hutz:/tmp/cvs-serv17634/css/aural
Modified Files:
ACssProperties.java
Log Message:
Utf8 properties (Jean-Guilhem Rouel)
Index: ACssProperties.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/aural/ACssProperties.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ACssProperties.java 8 Apr 2002 21:16:56 -0000 1.2
+++ ACssProperties.java 12 Jul 2005 14:47:55 -0000 1.3
@@ -6,36 +6,39 @@
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.aural;
-import java.util.Properties;
import java.net.URL;
import org.w3c.css.properties.CssProperty;
+import org.w3c.css.util.Utf8Properties;
/**
* @version $Revision$
*/
public class ACssProperties {
- public static Properties properties;
- public static Properties UAproperties;
+ public static Utf8Properties properties;
+
+ public static Utf8Properties UAproperties;
public static Float getValue(CssProperty property, String prop) {
- String value = UAproperties.getProperty(property.getPropertyName()+"."+prop);
+ String value = UAproperties.getProperty(property.getPropertyName()
+ + "." + prop);
if (value == null) {
- System.err.println( "Can't find value for " + property.getPropertyName()+"."+prop );
+ System.err.println("Can't find value for "
+ + property.getPropertyName() + "." + prop);
return null;
} else {
try {
return Float.valueOf(value);
} catch (NumberFormatException e) {
- System.err.println( e );
- System.err.println( "Only float value are valid in properties" );
+ System.err.println(e);
+ System.err.println("Only float value are valid in properties");
return null;
}
}
}
public static String getString(CssProperty property, String prop) {
- return properties.getProperty(property.getPropertyName()+"."+prop);
+ return properties.getProperty(property.getPropertyName() + "." + prop);
}
public static boolean getInheritance(CssProperty property) {
@@ -43,26 +46,30 @@
}
static {
- UAproperties = new Properties();
+ UAproperties = new Utf8Properties();
try {
- URL url = ACssProperties.class.getResource("AuralDefault.properties");
+ URL url = ACssProperties.class
+ .getResource("AuralDefault.properties");
java.io.InputStream f = url.openStream();
UAproperties.load(f);
f.close();
} catch (Exception e) {
- System.err.println("CSS.ACSSProperties.ACssProperties: couldn't load UA properties ");
- System.err.println(" " + e.toString() );
+ System.err
+ .println("CSS.ACSSProperties.ACssProperties: couldn't load UA properties ");
+ System.err.println(" " + e.toString());
}
- properties = new Properties();
+ properties = new Utf8Properties();
try {
- URL url = ACssProperties.class.getResource("ACSSDefault.properties");
+ URL url = ACssProperties.class
+ .getResource("ACSSDefault.properties");
java.io.InputStream f = url.openStream();
properties.load(f);
f.close();
} catch (Exception e) {
- System.err.println("CSS.ACSSProperties.ACssProperties: couldn't load properties ");
- System.err.println(" " + e.toString() );
+ System.err
+ .println("CSS.ACSSProperties.ACssProperties: couldn't load properties ");
+ System.err.println(" " + e.toString());
}
}
}
Received on Tuesday, 12 July 2005 14:48:02 UTC