public class TokenPairExpressionIterator extends ExpressionAdapter
Expression to walk a Message body using an Iterator, which
grabs the content between a start and end token.
The message body must be able to convert to InputStream type which is used as stream to access the message
body.
For splitting XML files use TokenXMLExpressionIterator instead.| Modifier and Type | Field and Description |
|---|---|
protected String |
endToken |
protected boolean |
includeTokens |
protected String |
startToken |
| Constructor and Description |
|---|
TokenPairExpressionIterator(String startToken,
String endToken,
boolean includeTokens) |
| Modifier and Type | Method and Description |
|---|---|
protected Iterator<?> |
createIterator(org.apache.camel.Exchange exchange,
InputStream in,
String charset)
Strategy to create the iterator
|
protected Object |
doEvaluate(org.apache.camel.Exchange exchange,
boolean closeStream)
Strategy to evaluate the exchange
|
Object |
evaluate(org.apache.camel.Exchange exchange) |
boolean |
matches(org.apache.camel.Exchange exchange) |
String |
toString() |
assertionFailureMessage, evaluateassertMatches, initprotected final String startToken
protected final String endToken
protected final boolean includeTokens
public boolean matches(org.apache.camel.Exchange exchange)
matches in interface org.apache.camel.Predicatematches in class ExpressionSupportpublic Object evaluate(org.apache.camel.Exchange exchange)
evaluate in class ExpressionSupportprotected Object doEvaluate(org.apache.camel.Exchange exchange, boolean closeStream)
exchange - the exchangecloseStream - whether to close the stream before returning from this method.protected Iterator<?> createIterator(org.apache.camel.Exchange exchange, InputStream in, String charset)
exchange - the exchangein - input stream to iteratecharset - charsetApache Camel