public class InMemoryResourceLoader extends java.lang.Object implements ResourceLoader
Modifier and Type | Class and Description |
---|---|
static class |
InMemoryResourceLoader.Builder |
static class |
InMemoryResourceLoader.StringInputStreamSupplier |
Constructor and Description |
---|
InMemoryResourceLoader(java.util.Map<java.lang.String,com.google.common.base.Supplier<java.io.InputStream>> inputStreamMap) |
Modifier and Type | Method and Description |
---|---|
static InMemoryResourceLoader.Builder |
builder() |
boolean |
exists(java.lang.String path) |
com.google.common.base.Optional<java.nio.charset.Charset> |
getCharset(java.lang.String path) |
java.io.InputStream |
load(java.lang.String path) |
com.google.common.base.Optional<java.net.URL> |
toUrl(java.lang.String path) |
public InMemoryResourceLoader(java.util.Map<java.lang.String,com.google.common.base.Supplier<java.io.InputStream>> inputStreamMap)
public static InMemoryResourceLoader.Builder builder()
public com.google.common.base.Optional<java.nio.charset.Charset> getCharset(java.lang.String path)
getCharset
in interface ResourceLoader
public java.io.InputStream load(java.lang.String path)
load
in interface ResourceLoader
public boolean exists(java.lang.String path)
exists
in interface ResourceLoader
public com.google.common.base.Optional<java.net.URL> toUrl(java.lang.String path)
toUrl
in interface ResourceLoader