I hope this is the correct place for this question, so sorry if its not...
I have a performance centric application which requires some parsing of a custom protocol, we are storing our data in byte[] arrays, and I am required to parse the array (which I know will be string data) and return a value found in the string.
The way Im thinking of doing it is like this:
return
new String(
this.messageBytes()
).substring( *someindex* , 6);
I want to make it as memort efficient as possible, and fast!
what I need to know is:
Is this a good way of doing it?
Also, notice the
someindex; I need to calculate the position of the text "AAP" (like string.indexOf("AAP"))
Should I just create a temp string then parse it?
Thanks a lot!
Mark