• Post Reply Bookmark Topic Watch Topic
  • New Topic

NEED URGENTLY......regarding vector to a file!!!!  RSS feed

 
revathy samy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As i am new to java i need help urgently....

I am getting some datas from the vector.for simple testing i enumerate the vector and get the elements later i call this method for testing purpose...
seee the following

vector m_documents;


/** !!! FOR SMALL FILES ONLY!!! ONLY FOR TESTING!!!
*/

public String toString() {
java.lang.StringBuffer s = new java.lang.StringBuffer();

try{
java.util.Enumeration e = m_documents.elements();
while (e.hasMoreElements()) {
Document d = (Document) e.nextElement();
s.append(d.toString());
System.out.println("Testing is "+ d);
}
s.append(m_filetotal.toString());
s.append("\n");
}
catch(Exception e){
e.printStackTrace();
}


My requirement is can i get the same elements from the vector in to a File.so that i can get the values to a file.

please anyone help me......
 
Sri Ram
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at java.io.

 
reva oday
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi sri ram,
Thanks for ur reply....

I got it now

Regards
revathy
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!