public class DefaultCodecProvider extends Object implements CodecProvider
CodecProvider for details on a more
useful implementation.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultCodecProvider.DummyHandler
CodecHandler implementation which does nothing, useful for databases with
no extra encoding.
|
static class |
DefaultCodecProvider.UnsupportedHandler
CodecHandler implementation which always throws
UnsupportedCodecException, useful for databases with unsupported
encodings.
|
| Modifier and Type | Field and Description |
|---|---|
static CodecHandler |
DUMMY_HANDLER
common instance of
DefaultCodecProvider.DummyHandler |
static CodecProvider |
INSTANCE
common instance of DefaultCodecProvider
|
static CodecHandler |
UNSUPPORTED_HANDLER
common instance of
DefaultCodecProvider.UnsupportedHandler |
| Constructor and Description |
|---|
DefaultCodecProvider() |
| Modifier and Type | Method and Description |
|---|---|
CodecHandler |
createHandler(PageChannel channel,
Charset charset)
Returns a new CodecHandler for the database associated with the given
PageChannel.
|
public static final CodecProvider INSTANCE
public static final CodecHandler DUMMY_HANDLER
DefaultCodecProvider.DummyHandlerpublic static final CodecHandler UNSUPPORTED_HANDLER
DefaultCodecProvider.UnsupportedHandlerpublic CodecHandler createHandler(PageChannel channel, Charset charset) throws IOException
This implementation returns DUMMY_HANDLER for databases with no encoding and UNSUPPORTED_HANDLER for databases with any encoding.
createHandler in interface CodecProviderchannel - the PageChannel for a Databasecharset - the Charset for the DatabasenullIOExceptionCopyright © 2005–2025 OpenHMS. All rights reserved.