Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

FileInputStream to read records from a text file  RSS feed

 
KedariNadh vsilla
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I have an application where i want to write and read records to and from a file using Streams.while reading how can i split
a record to get individual columns.
Thanks in Advance.
 
harilal ithikkat
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
share the format of file
 
KedariNadh vsilla
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranch Hand,
while write data to a file using stream means its in unreadable format.Am i right?then i can i split a record based on the specific delimeter.
 
harilal ithikkat
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am afraid to say this..i didnt get your question yet
 
naresh voota
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kedarinadh,

If your question is, can you split a text basing on some delimiter? yes you can.

All you need to do is read the file and split the text basing on a separator. The below link is useful.

http://www.javapractices.com/topic/TopicAction.do?Id=42

Thanks,
Naresh Voota.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!