Moved EncryptionDataSegmentHeaderRegex from ResponseParser to MessageUtils
This commit is contained in:
parent
d97375d949
commit
3dc8e64127
|
@ -28,8 +28,6 @@ open class ResponseParser(
|
|||
) {
|
||||
|
||||
companion object {
|
||||
val EncryptionDataSegmentHeaderRegex = Regex("${MessageSegmentId.EncryptionData.id}:\\d{1,3}:\\d{1,3}\\+")
|
||||
|
||||
val JobParametersSegmentRegex = Regex("HI[A-Z]{3}S")
|
||||
|
||||
const val FeedbackParametersSeparator = "; "
|
||||
|
|
|
@ -8,6 +8,8 @@ open class MessageUtils {
|
|||
|
||||
companion object {
|
||||
val BinaryDataHeaderPattern = Regex("@\\d+@")
|
||||
|
||||
val EncryptionDataSegmentHeaderRegex = Regex("${MessageSegmentId.EncryptionData.id}:\\d{1,3}:\\d{1,3}\\+")
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,7 +42,7 @@ open class MessageUtils {
|
|||
|
||||
if (binaryDataHeaderStartIndex > 15) {
|
||||
|
||||
ResponseParser.EncryptionDataSegmentHeaderRegex.find(dataString, binaryDataHeaderStartIndex - 15)?.let { matchResult ->
|
||||
EncryptionDataSegmentHeaderRegex.find(dataString, binaryDataHeaderStartIndex - 15)?.let { matchResult ->
|
||||
return matchResult.range.start < binaryDataHeaderStartIndex
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue