Clover coverage report - Maven Clover report
Coverage timestamp: Sun Mar 18 2007 17:43:17 CET
file stats: LOC: 34   Methods: 1
NCLOC: 24   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
EscapeHandlerConverter.java 100% 88.9% 100% 91.7%
coverage coverage
 1    package com.agical.rdoc.core.converter.impl;
 2   
 3    import java.io.IOException;
 4    import java.io.InputStream;
 5    import java.util.Iterator;
 6    import java.util.Properties;
 7   
 8    import com.agical.rdoc.core.converter.ConversionException;
 9    import com.agical.rdoc.core.converter.InputStreamConverter;
 10    import com.agical.rdoc.util.SimpleEscapeHandler;
 11   
 12    /**
 13    * @author brolund
 14    *
 15    * (c) 2005 Agical AB
 16    */
 17    public class EscapeHandlerConverter implements InputStreamConverter {
 18   
 19  1 public Object convert(InputStream stream) throws ConversionException {
 20  1 try {
 21  1 Properties properties = new Properties();
 22  1 properties.load( stream );
 23  1 SimpleEscapeHandler escapeHandler = new SimpleEscapeHandler();
 24  1 for (Iterator iter = properties.keySet().iterator(); iter.hasNext();) {
 25  1 String key = (String) iter.next();
 26  1 escapeHandler.setEscape( key, properties.getProperty(key) );
 27    }
 28  1 return escapeHandler;
 29    } catch (IOException e) {
 30  0 throw new ConversionException( "Could not read properties from stream" );
 31    }
 32    }
 33   
 34    }