txt file
1 posts in topic
Flat View  Flat View

Posted By:   hary_andri
Posted On:   Tuesday, September 13, 2005 08:04 AM

I would like to create .TXT file - In fact I would like the java program to place into some specified locations (column number; line number) data source code for another programming language. The goal is to place into some boxes data - each boxe match with a couple (column number; line number) - Then the TXT file built will be compiled for another program.

I'm starting learning Java2 but I would like yet know ""much"" little by little

Thanks / Hary>

Re: txt file

Posted By:   Almagest_FUTT  
Posted On:   Wednesday, September 14, 2005 12:06 PM

  • Grab a java.io.File Object

  • Choose a charset

  • Open a java.io.Writer (perhaps java.io.FileWriter)

  • Write fancy java.lang.Strings using java.io.Writer::write(java.lang.String)

Alternatively, if you're using Java 1.5:
  • Grab a java.io.File Object

  • Choose a charset

  • Open a java.io.PrintStream

  • Write fancy stuff using java.io.PrintStream::printf(String, Object...)
About | Sitemap | Contact