public class MemoryStore extends Object implements ResourceStore
| Modifier and Type | Field and Description |
|---|---|
protected String |
location |
protected Map<String,byte[]> |
store |
| Constructor and Description |
|---|
MemoryStore() |
MemoryStore(Map<String,byte[]> store) |
| Modifier and Type | Method and Description |
|---|---|
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() |
public MemoryStore()
public MemoryStore(Map<String,byte[]> store)
public boolean exists(String name)
exists in interface ResourceStorepublic byte[] getBytes(String name)
getBytes in interface ResourceStorepublic InputStream getStream(String name)
getStream in interface ResourceStorepublic URL getURL(String name)
getURL in interface ResourceStorepublic long lastModified(String name)
lastModified in interface ResourceStorepublic void put(String name, InputStream data) throws IOException
put in interface ResourceStoreIOExceptionpublic void put(String name, byte[] data) throws IOException
put in interface ResourceStoreIOExceptionpublic void remove(String name)
remove in interface ResourceStorepublic String getLocation()
ResourceStoregetLocation in interface ResourceStoreCopyright © 2019 Nuxeo. All rights reserved.