I have a piece of code that has been working for years until today. After debugging I realized that last token it not collected correctly. I think is because of his length (more than 10k chars).
Code:
StringTokenizer tokens = new StringTokenizer(myString,"&&&&&&&");
(...)
String s=tokens.nextToken();
//Do something with s
s=tokens.nextToken();
//Do something with s
s=tokens.nextToken();
//Do something with s
//Now it's time of last and biggest token
s=tokens.nextToken(); // --> s does not contain entire string