1 16 19 package com.sun.org.apache.xml.internal.serializer; 20 21 import java.util.Properties ; 22 23 29 public class OutputPropertyUtils 30 { 31 43 public static boolean getBooleanProperty(String key, Properties props) 44 { 45 46 String s = props.getProperty(key); 47 48 if (null == s || !s.equals("yes")) 49 return false; 50 else 51 return true; 52 } 53 54 66 public static int getIntProperty(String key, Properties props) 67 { 68 69 String s = props.getProperty(key); 70 71 if (null == s) 72 return 0; 73 else 74 return Integer.parseInt(s); 75 } 76 77 } 78 | Popular Tags |