org.nuxeo.ecm.webengine.loader.store
Class MemoryStore
java.lang.Object
org.nuxeo.ecm.webengine.loader.store.MemoryStore
- All Implemented Interfaces:
- ResourceStore
public class MemoryStore
- extends java.lang.Object
- implements ResourceStore
- Author:
- Bogdan Stefanescu
Method Summary |
boolean |
exists(java.lang.String name)
|
byte[] |
getBytes(java.lang.String name)
|
java.lang.String |
getLocation()
A string that uniquely identify the location of that store. |
java.io.InputStream |
getStream(java.lang.String name)
|
java.net.URL |
getURL(java.lang.String name)
|
long |
lastModified(java.lang.String name)
|
void |
put(java.lang.String name,
byte[] data)
|
void |
put(java.lang.String name,
java.io.InputStream data)
|
void |
remove(java.lang.String name)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MemoryStore
public MemoryStore()
MemoryStore
public MemoryStore(java.util.Map<java.lang.String,byte[]> store)
exists
public boolean exists(java.lang.String name)
- Specified by:
exists
in interface ResourceStore
getBytes
public byte[] getBytes(java.lang.String name)
- Specified by:
getBytes
in interface ResourceStore
getStream
public java.io.InputStream getStream(java.lang.String name)
- Specified by:
getStream
in interface ResourceStore
getURL
public java.net.URL getURL(java.lang.String name)
- Specified by:
getURL
in interface ResourceStore
lastModified
public long lastModified(java.lang.String name)
- Specified by:
lastModified
in interface ResourceStore
put
public void put(java.lang.String name,
java.io.InputStream data)
throws java.io.IOException
- Specified by:
put
in interface ResourceStore
- Throws:
java.io.IOException
put
public void put(java.lang.String name,
byte[] data)
throws java.io.IOException
- Specified by:
put
in interface ResourceStore
- Throws:
java.io.IOException
remove
public void remove(java.lang.String name)
- Specified by:
remove
in interface ResourceStore
getLocation
public java.lang.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 java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2010 Nuxeo SAS. All Rights Reserved.