public final class StreamProcessor extends BaseStreamProcessor
List of supported properties:
Modifier and Type | Field and Description |
---|---|
static String |
ENABLE_ERROR_RECOVERY
Used as a key with
setProperty(String, Object) method. |
static String |
PROCESSOR_GRAPH_HANDLER_PROPERTY
Used as a key with
setProperty(String, Object) method. |
static String |
XML_READER_PROPERTY
Used as a key with
setProperty(String, Object) method. |
Constructor and Description |
---|
StreamProcessor(DataSink sink)
Instantiates stream processor for pipe starting with specified sink.
|
Modifier and Type | Method and Description |
---|---|
protected void |
endStream() |
void |
processInternal(InputStream inputStream,
String mimeType,
String baseUri) |
void |
processInternal(Reader reader,
String mimeType,
String baseUri) |
boolean |
setProperty(String key,
Object value)
Key-value based settings.
|
protected void |
startStream() |
createSourceForSink, process, process, process, process, process, process, process, process
public static final String XML_READER_PROPERTY
setProperty(String, Object)
method.
Allows to specify custom XMLReader
used with SAX parsers.public static final String ENABLE_ERROR_RECOVERY
setProperty(String, Object)
method.
Enables or disables error recovery mechanism.public static final String PROCESSOR_GRAPH_HANDLER_PROPERTY
setProperty(String, Object)
method.
Allows to specify handler for processor events.
Subclass of ProcessorGraphHandler
must be passed as a value.public StreamProcessor(DataSink sink)
sink
- pipe's inputpublic void processInternal(InputStream inputStream, String mimeType, String baseUri) throws ParseException
processInternal
in class BaseStreamProcessor
ParseException
protected void startStream() throws ParseException
startStream
in class BaseStreamProcessor
ParseException
protected void endStream() throws ParseException
endStream
in class BaseStreamProcessor
ParseException
public void processInternal(Reader reader, String mimeType, String baseUri) throws ParseException
processInternal
in class BaseStreamProcessor
ParseException
public boolean setProperty(String key, Object value)
BaseStreamProcessor
setProperty
in class BaseStreamProcessor
key
- property keyvalue
- property valueCopyright © 2012–2013. All rights reserved.