@EventDriven @SideEffectFree @InputRequirement(value=INPUT_REQUIRED) @SupportsBatching @Tags(value={"text","convert","characterset","character set"}) @CapabilityDescription(value="Converts a FlowFile\'s content from one character set to another") public class ConvertCharacterSet extends AbstractProcessor
This processor reads files in as text according to the specified character set and it outputs another text file according to the given character set. The character sets supported depend on the version of the JRE and is platform specific. In addition, the JVM can be expanded with additional character sets to support. More information on which character sets are supported can be found in the JDK documentation under the docs directory in the following path: ....\technotes\guides\intl\encoding.doc.html
The conversion process is very passive. For conversions that do not map perfectly the conversion will replace unmappable or unrecognized input using the '?' character.
The following properties are required:
The following properties are optional:
The following relationships are required:
Modifier and Type | Field and Description |
---|---|
static PropertyDescriptor |
INPUT_CHARSET |
static int |
MAX_BUFFER_SIZE |
static PropertyDescriptor |
OUTPUT_CHARSET |
private List<PropertyDescriptor> |
properties |
static Relationship |
REL_SUCCESS |
private Set<Relationship> |
relationships |
Constructor and Description |
---|
ConvertCharacterSet() |
Modifier and Type | Method and Description |
---|---|
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ProcessorInitializationContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public static final PropertyDescriptor INPUT_CHARSET
public static final PropertyDescriptor OUTPUT_CHARSET
public static final Relationship REL_SUCCESS
public static final int MAX_BUFFER_SIZE
private Set<Relationship> relationships
private List<PropertyDescriptor> properties
protected void init(ProcessorInitializationContext context)
init
in class AbstractSessionFactoryProcessor
public Set<Relationship> getRelationships()
getRelationships
in interface Processor
getRelationships
in class AbstractSessionFactoryProcessor
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
public void onTrigger(ProcessContext context, ProcessSession session)
onTrigger
in class AbstractProcessor
Copyright © 2020 Apache NiFi Project. All rights reserved.