|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.reverseXSL.message.Header
public abstract class Header
NOTE: The support for EDI headers is not yet integrated into the current version of the tool set, but a few static utility procedures are already used elsewhere. Headers will become syntax-independent address handling and routing vehicles in a future release.
Constructor Summary | |
---|---|
Header()
|
Method Summary | |
---|---|
static java.lang.String |
extractReference(java.lang.CharSequence s,
java.lang.String regex)
The procedure concatenates all captured info pieces (by one or several capturing groups in the regular expression) from the first match found in the char sequence passed as argument, using MULTILINE and DOTALL modes. |
static java.lang.String |
extractReference(java.lang.CharSequence s,
java.lang.String regex,
int upTo)
Variant of extractReference(CharSequence, String) that limits here the pattern
lookup to the region from the first to 'upTo' characters. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Header()
Method Detail |
---|
public static java.lang.String extractReference(java.lang.CharSequence s, java.lang.String regex)
This procedure is inspired from Parser.extractCompositeValue(StringBuffer, Pattern)
but with two differences: It does not loop on matcher.find() but calls it only once, and--second--it works in MULTILINE
mode.
MULTILINE indicates that the '^' and '$' can match not only the start and end of the
entire char sequence, but also any intermediate line terminator (delimited by LF, CRLF, CR alone, or the Unicode
next-line, line-separator, and paragraph marks). Note that matching characters of a CRLF sequence requires
for instance the pattern "$..^".
DOTALL indicates that the '.' matches any character including
line terminator characters.
s
- the char sequence from which to extract the reference: a CharBuffer, String, or StringBufferregex
- the regex pattern to match; only the first match is considered.
public static java.lang.String extractReference(java.lang.CharSequence s, java.lang.String regex, int upTo)
extractReference(CharSequence, String)
that limits here the pattern
lookup to the region from the first to 'upTo' characters.
s
- the char sequence from which to extract the reference: a CharBuffer, String, or StringBufferregex
- the regex pattern to match; only the first match is considered.upTo
- is used to delimit the matching region, so that the entire message is surely not parsed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |