public class FragmentationUtils extends Object
Constructor and Description |
---|
FragmentationUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
appendSegments(StringBuilder sb,
List<String> segments,
int startIndex,
int endIndex)
Appends segments from startIndex to endIndex-1 to the given StringBuilder.
|
static void |
appendSplitSegment(StringBuilder sb,
List<String> fields,
char fieldSeparator)
Appends a split segment to the given StringBuilder.
|
static String |
ensureMaximalSegmentsLength(String message,
int maxLength)
Ensures that all segments in the given HL7 message string representation
are not longer than the given value (-1 means positive infinity).
|
static CharSequence |
joinSegments(List<String> segments,
int startIndex,
int endIndex)
Joins segments from startIndex to endIndex-1.
|
static String |
keyString(String... pieces)
Creates a single key string from the given key pieces.
|
static List<String> |
splitString(String s,
char c)
Splits the given String at occurrences of the given character.
|
static String |
uniqueId()
Returns an unique value which can be used, for example, as an HL7v2 message ID.
|
public static List<String> splitString(String s, char c)
public static String ensureMaximalSegmentsLength(String message, int maxLength)
'\r'
characters are not considered in the length computation.
message
- string representation of the source HL7 message.maxLength
- maximal segment length, must be either -1 or greater than 4.public static void appendSplitSegment(StringBuilder sb, List<String> fields, char fieldSeparator)
public static void appendSegments(StringBuilder sb, List<String> segments, int startIndex, int endIndex)
public static CharSequence joinSegments(List<String> segments, int startIndex, int endIndex)
public static String keyString(String... pieces)
public static String uniqueId()
Copyright © 2018 Open eHealth Foundation. All rights reserved.