public class StringTranslatorFactory extends ValueTranslatorFactory<String,Object>
Modifier and Type | Field and Description |
---|---|
static int |
MAX_STRING_BYTES
Maximum number of BYTES we can store in a String before we have to convert to Text.
|
static int |
SAFE_STRING_CHARS
Google isn't explicit that UTF-8 encoding is used, but it's a safe assumption.
|
Constructor and Description |
---|
StringTranslatorFactory() |
Modifier and Type | Method and Description |
---|---|
protected ValueTranslator<String,Object> |
createValueTranslator(TypeKey<String> tk,
CreateContext ctx,
Path path)
Create a translator, knowing that we have the appropriate type.
|
create
public static final int MAX_STRING_BYTES
public static final int SAFE_STRING_CHARS
protected ValueTranslator<String,Object> createValueTranslator(TypeKey<String> tk, CreateContext ctx, Path path)
ValueTranslatorFactory
createValueTranslator
in class ValueTranslatorFactory<String,Object>
tk
- type is guaranteed to erase to something assignable to ClassCopyright © 2017. All rights reserved.