aspose file tools*
The moose likes Java in General and the fly likes Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java" Watch "Java" New topic
Author

Java

saravana kumar
Ranch Hand

Joined: Jun 25, 2002
Posts: 72
can anybody tell about streamtokanizer briefly?
Younes Essouabni
Ranch Hand

Joined: Jan 13, 2002
Posts: 479
StreamTokenizer
From the API
The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time.
For example with String str="A string containing 5 tokens"
If you use StreamTokenizer you 'll get 5 tokens that you may use.
1st token is 'A'
2nd token is 'string'
3rd token is 'containing'
4th token is '5'
5th token is 'tokens'
I Hope it helps!


Younes
By constantly trying one ends up succeeding. Thus: the more one fails the more one has a chance to succeed.
Nigel Kat
Greenhorn

Joined: Jun 25, 2002
Posts: 16
Alsdo check StringTokenizer,MUCH easier to use that the StreamTokenizer version if you can afford the stream to string read/write.
Kat
>^..^<
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
also check the new split() method in the String class in the new JDK 1.4
much easier than the StringTokeniezier
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java