Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to verify that java string is valid and doesn't contain EOF?

MagwaaApr 1 2016 — edited Apr 1 2016

Dear All,

  I wrote SOAP based web service in Java to sync data between multiple locations. The Service works fine with almost all the data but crashes when a string having machine readings is sent.

The Example data in a string is:

"

0H|\^&|||ARCHITECT^5.00^Number1^H1P1O1R1C1Q1L1|||||||P|1|20091128163744

83

1P|1|||||||U

F7

2O|1|135682|135682^C272^2|^^^721^HIV Ag/Ab^UNDILUTED^P|R||||||||||||||||||||F

01

3R|1|^^^721^HIV Ag/Ab^UNDILUTED^P^78170HN00^00802^^F|0.19|S/CO||||F||||20091128162538|iSR06355

17

4R|2|^^^721^HIV Ag/Ab^UNDILUTED^P^78170HN00^00802^^I|Nonreactive|||||F||||20091128162538|iSR06355

BE

5R|3|^^^721^HIV Ag/Ab^UNDILUTED^P^78170HN00^00802^^P|447|RLU||||F||||20091128162538|iSR06355

DB

6L|1

3F"

When i pass this string the service crashes saying that if found unexpected end of file. I have devised a way to sort it out as i am dealing this format as a Char. Now what i want is to differentiate between the conventional string and string having such data. Any guess or help anyone can offer?

Regards,

--Magwaa

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 29 2016
Added on Apr 1 2016
0 comments
748 views