parsing strings and calling sp with the parsed strings ( efficiency) in java
<p>I have data which looks like this ( examples)</p>

<p>I want to parse this string ( Notice that the delimiter can be | , a space or &lt;> some ) </p>

<p>And the substrings in each string have to be parsed and the data needs to be populated into an list which looks like this ( given below). The major problem is that the position of the substring differs depending on the string ( 3 types of examples are given below ) Means Eg: say UnitNo in string 1 is in position 19 and in String 2 is in Pos 1. L1 is in Positin 3 in String 1 and L1 is in position 6 in string 2 .</p>

<p>The parsing must be fast and these become parameters to a stored procedure which will be called from the java program. There will be like a billion record strings atleast. So should we have threads which will call the db procedure. What is the best way to do this ( keeping efficiency in mind) - parsing and calling the db procedure.</p>

<p>Thnx</p>

<p>-----List---- UnitNo L1 L2 STime speed direction status preading greading freading lreading Ireading PSource Battery1 Battery2 ID i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 a1 a2 a3 a4 a5</p>

<hr>

<p>String 1</p>

<p>^0609|8|2829.49673|07704.82322|13.627|130.59|140312075012|2|0|A|1|0|0|0|3.015600|12.230000|2748.26|76373.00|352024027728165|!</p>

<p>String 2</p>

<p>FC03 00140700 00007D04 0002E702 0001624F 00C02A9D 049C5D4C 00000014 00025A39 00000008 000FE348</p>

<p>String 3 ^id=PTTRK30ES861001000245502&amp;POS=&lt;3.1>&lt;1259.429640>&lt;07735.382010>&lt;084038>&lt;260312>&lt;0.000>&lt;0.0>&lt;22>&lt;06>&lt;0>&lt;0>&lt;67>&lt;0>&lt;0>&lt;0.09>&lt;0.0>&lt;5.73>&lt;2.2>&lt;0>&lt;0.0>@</p>

<p>================================</p>
