Clover coverage report - Acegi Security System for Spring - 1.0.0-RC1
Coverage timestamp: Mon Dec 5 2005 09:05:15 EST
file stats: LOC: 40   Methods: 4
NCLOC: 22   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
InMemoryResource.java 0% 0% 0% 0%
coverage
 1    package org.acegisecurity.util;
 2   
 3    import org.springframework.core.io.AbstractResource;
 4   
 5    import java.io.ByteArrayInputStream;
 6    import java.io.InputStream;
 7    import java.io.IOException;
 8   
 9    /**
 10    * An in memory implementation of Spring's {@link org.springframework.core.io.Resource} interface.
 11    * <p>
 12    * Used by the "Acegifier" web application to create a
 13    * bean factory from an XML string, rather than a file.
 14    * </p>
 15    *
 16    * @author Luke Taylor
 17    * @version $Id: InMemoryResource.java,v 1.3 2005/11/17 00:56:09 benalex Exp $
 18    */
 19    public class InMemoryResource extends AbstractResource {
 20   
 21    ByteArrayInputStream in;
 22    String description;
 23   
 24  0 public InMemoryResource(byte[] source) {
 25  0 this(source, null);
 26    }
 27   
 28  0 public InMemoryResource(byte[] source, String description) {
 29  0 in = new ByteArrayInputStream(source);
 30  0 this.description = description;
 31    }
 32   
 33  0 public String getDescription() {
 34  0 return description == null ? in.toString() : description;
 35    }
 36   
 37  0 public InputStream getInputStream() throws IOException {
 38  0 return in;
 39    }
 40    }