public class StringCodecFactory extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StringCodecFactory.IdentEncoding
Usage of this class discouraged.
|
static class |
StringCodecFactory.ISO9075Helper
Usage of this class discouraged.
|
static class |
StringCodecFactory.NameEncoding
Helper class for encoding and decoding node names
|
static class |
StringCodecFactory.UriEncoding
Direct usage of this class discouraged.
|
Constructor and Description |
---|
StringCodecFactory(Map<String,StringCodec> codecs)
Initialized a StringCodecFactory with the given and fixed StringCodec mappings.
|
Modifier and Type | Method and Description |
---|---|
StringCodec |
getStringCodec()
Requests the default encoder to use.
|
StringCodec |
getStringCodec(String encoding)
Requests which encoder to use for the given symbolic name.
|
StringCodec |
getStringCodec(String encoding,
String locale)
Requests which encoder to use for the given symbolic name and locale.
|
public StringCodecFactory(Map<String,StringCodec> codecs)
codecs
- a map of codecs to bind to their symbolic names. The map becomes immutable.public StringCodec getStringCodec()
public StringCodec getStringCodec(String encoding)
encoding
- the symbolic name of the encoder that is requestedStringCodec
to use, which might be a fall-back encoder or null if non was defined.public StringCodec getStringCodec(String encoding, String locale)
language_country
, e.g. en_GB
, it will first try language_country
and then
language
.encoding
- the symbolic name of the encoder that is requestedlocale
- the locale for the requested codecStringCodec
to use, which might be a fall-back encoder or null if non was defined.Copyright © 2007–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.