HI i am trying to tokenise a text file using StringTokeniser in java. But the problem is it only takes the last word of the line. Little help is needed. This sample code is part of a map-reduce function.
String profile;
StringTokenizer inputKey=new StringTokenizer(value.toString());
while(inputKey.hasMoreTokens()){
String input=inputKey.nextToken();
if(!input.endsWith("</id>")){
textInput.set(input);
} else {
profile=input.substring(4,15);
profileId.set(profile);
}
}