• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem writing to a file from a vector  RSS feed

 
Candy Bortniker
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a problem writing a vector to a file. I think I'm missing a step but don't know what it is. What I get in my file is cryptic stuff that isn't what I what to see. Any suggestions?
 
Jeff Langr
author
Ranch Hand
Posts: 799
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One problem with the above code (there are a few) is that it sounds like you want to write to a text file. You are using an ObjectOutputStream, which will store the entire transaction object as a "serialized" Java object, i.e. a binary stream of data. You probably want to use a writer class.
This might help...

Also, I'm not sure why you are creating temporary references to all of the transaction fields before writing.
Good luck.
-Jeff-
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!