Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Storing one record at time in file  RSS feed

 
Ali Khan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

well basically, i got on how to create file and store some data into it in java but i already have experience instoring data into file in VB. In i used to create a one record the data for e.g.

this is how in visual basic looks...

public type recordType

Integer ID
String Name
etc....

End type...

now the above vb code is a one record... my question is that is there a way to create such record in Java, if it is how do you do that.... and secondly how do you implement this to store in the file....

please guys help me on this...thanks in advance....

Khan....
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If by record you mean line - terminated with a newline - you probably want the println method of a PrintWriter. Read the doc for PrintWriter and see what you find.

It sounds like you might benefit by backing up and reading the Sun IO Tutorial, too.

Have fun, let us know what you make!
 
Ali Khan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no you misunderstood my entire post, lol, dont worry i got it some of help from someone, they told me that i need a sperate class called 'Client or anything, in that i will shall i add the following code, which i did,



but how do i store the information using object thing into random access file and is there flexgrid in java, which i could use to output the details, i want the program to store the record at the end of the each time when new record is store rather replacing previous records....

please do help me,,,, thanks in advance

Khan
[ December 15, 2007: Message edited by: Ali Khan ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!