DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37614>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37614





------- Additional Comments From [EMAIL PROTECTED]  2005-11-23 19:18 -------
public final class MemoryResourceStore implements ResourceStore {

    private final static Log log = LogFactory.getLog(MemoryResourceStore.class);

        private final Map store = new HashMap();
        
        public byte[] read( final String resourceName ) {
                return (byte[]) store.get(resourceName.replace('.', '/') + 
".class");
        }

        public void write( final String resourceName, final byte[] clazzData ) {
                log.debug("storing resource " + resourceName + "(" + 
clazzData.length + ")");
                store.put(resourceName.replace('.', '/') + ".class", clazzData);
        }
        
    public void remove( final String resourceName ) {
        log.debug("removing resource " + resourceName);
        store.remove(resourceName.replace('.', '/') + ".class");
    }

    public String toString() {
        return this.getClass().getName() + store.toString();
    }
            
    public String[] list() {
        if ( store == null ) {
            return new String[0];
        }
        return ( String[] ) this.store.keySet().toArray( new String[
this.store.size() ] );
    }
}

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to