• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is it possible in Java IO

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to write data to a file.
If i open the file to see my data, at the end of data there should be no return character fields.
Generally if we open a file, at the end of data we can add lines to this file, but in my case at the end of data i have to add "$username"(this is prompt).

Example: my data in a file :
// assume this is editor
field1 field2 field3 .......
username$ (Prompt)

I have to do like this:
field1 field2 field3 ....... username$
Here there is no prompt, the prompt should appear at the end of file......
Is it possible...
Any help would be greatly appreciate.
Thankx in advanch....
Ravi
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, you grab the username prior to opening a file and store it in temporary and start writing into a file. Once you�re done writing you append the username, then close the file (one solution).
 
Ravi Mandalapu
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Cundra Mundra,
Thank you very much for your response.
I have to display the prompt at the end of the file.
Could you please send me the sample code, if possible.
Because i am new to IO's.
Thank you very much.
Waiting for your response.
Ravi
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic