public class ClasspathConnector extends AbstractConnector
Default Charset "UTF-8" is used to read the content from Classpath.
Constructor and Description |
---|
ClasspathConnector() |
Modifier and Type | Method and Description |
---|---|
String |
getCharset() |
byte[] |
getContent(String key)
return a byte[]-Value for the given key.
|
Object |
getObject(String key)
return a Object-Value for the given key.
|
String |
getString(String key)
return a String-Value for the given key.
|
void |
setCharset(String charset) |
void |
setContentResolver(ContentResolver contentResolver)
set a ContentResolver as Helper for
Connector.getContent(String) . |
addConnector, getConnectors, getContentResolver, getName, getObjectResolver, init, setName, setObjectResolver
public byte[] getContent(String key)
The concrete implementation can use the ContentResolver if required
key
- the Key for the configuration-property. e.g.: "com/mycompany/myapp/myParameterKey"public Object getObject(String key)
The concrete implementation can use the ObjectResolver if required
key
- the Key for the configuration-property. e.g.: "com/mycompany/myapp/myParameterKey"public String getString(String key)
key
- the Key for the configuration-property. e.g.: "com/mycompany/myapp/myParameterKey"public String getCharset()
public void setCharset(String charset)
public void setContentResolver(ContentResolver contentResolver)
Connector.getContent(String)
.setContentResolver
in interface Connector
setContentResolver
in class AbstractConnector
contentResolver
- the ContentResolver to set.Copyright © 2008–2014. All rights reserved.