Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java  RSS feed

 
saravana kumar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anybody tell about streamtokanizer briefly?
 
Younes Essouabni
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Nigel Kat
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
also check the new split() method in the String class in the new JDK 1.4
much easier than the StringTokeniezier
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!