Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webengine.loader.store
Class MemoryStore

java.lang.Object
  extended by org.nuxeo.ecm.webengine.loader.store.MemoryStore
All Implemented Interfaces:
ResourceStore

public class MemoryStore
extends Object
implements ResourceStore

Author:
Bogdan Stefanescu

Constructor Summary
MemoryStore()
           
MemoryStore(Map<String,byte[]> store)
           
 
Method Summary
 boolean exists(String name)
           
 byte[] getBytes(String name)
           
 String getLocation()
          A string that uniquely identify the location of that store.
 InputStream getStream(String name)
           
 URL getURL(String name)
           
 long lastModified(String name)
           
 void put(String name, byte[] data)
           
 void put(String name, InputStream data)
           
 void remove(String name)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MemoryStore

public MemoryStore()

MemoryStore

public MemoryStore(Map<String,byte[]> store)
Method Detail

exists

public boolean exists(String name)
Specified by:
exists in interface ResourceStore

getBytes

public byte[] getBytes(String name)
Specified by:
getBytes in interface ResourceStore

getStream

public InputStream getStream(String name)
Specified by:
getStream in interface ResourceStore

getURL

public URL getURL(String name)
Specified by:
getURL in interface ResourceStore

lastModified

public long lastModified(String name)
Specified by:
lastModified in interface ResourceStore

put

public void put(String name,
                InputStream data)
         throws IOException
Specified by:
put in interface ResourceStore
Throws:
IOException

put

public void put(String name,
                byte[] data)
         throws IOException
Specified by:
put in interface ResourceStore
Throws:
IOException

remove

public void remove(String name)
Specified by:
remove in interface ResourceStore

getLocation

public String getLocation()
Description copied from interface: ResourceStore
A string that uniquely identify the location of that store. Two stores are considered equals if their locations are the same.

Specified by:
getLocation in interface ResourceStore

toString

public String toString()
Overrides:
toString in class Object

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.