🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18410

the RandomFile class of java.io. I/O Reading for passing tokens.

#18410
From: Rohit Bhardwaj
Date: Fri, 26 Jun 1998 00:00
31 lines
1583 bytes
Hi I have a Question regarding data inputstream reading following structures
"
Dear Bhardwaj,

See, I  have to read a text file. These are some of  the records of the
text file:

PC001 pc001.tisco.co.jp  100.100.100.101 0001 XXXX Pentium233 PC001.PDF

See that each field is separated by a whitespace character. I can very
easily read it using the RandomFile class of java.io. But, I wish to do
this using FileReader class and the StreamTokenizer class. I have
already coded it using the FileReader and StreamTokenizer class, but the
problem is the StreamTokenizer is not reading

100.100.100.101 as one token (because it is identifying 100.1 as one
token and so on), and so I am not getting the expected results. I wish
to set a parameter so that it reads 100.100.100.101 as one word token,
and not many number tokens as it is diong now.

If you can, then suggest what you think. I am now implementing it in the
traditional way, using the RandomAcessFile class.

P.S. I am using JBuilder.

Waiting for your reply.

Best regards,
Anindya Sharma
"
Technical Details
Message-ID: <6n04b5$p1b12@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,c1fb37af64c06efa,start
X-Google-Attributes: gidf74b3,public
From: "Rohit Bhardwaj" <rbhardwa@etd.modtechcorp.com>
Subject: the RandomFile class of java.io.  I/O Reading for passing tokens.
Date: 1998/06/26
Message-ID: <6n04b5$p1b12@forums.borland.com>
X-Deja-AN: 366284934
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language