Chris:
Try the methods available in java.util.StringTokenizer class. (This should answer your
second question.)
Geeta
"Jenkins, Christopher" wrote:
> I'm using the following bit of code to write to a file, how do I start a new
> record /line?
>
> Secondly are there any methods avavilable to take comma delimited string and
> build an array from it?
> try
> {
> // Code to write to file
> String outputFileName = File.separatorChar + "development" +
> File.separatorChar + "build" +
> File.separatorChar + "tomcat" +
> File.separatorChar + "webapps" +
> File.separatorChar + "examples" +
> File.separatorChar + "list.txt";
> File outputFile = new File(outputFileName);
> FileWriter fout = new FileWriter(outputFile);
>
> // Write Records to File
> fout.write("0,Alpha");
> // New Record Required
> fout.write("1,Beta");
>
> fout.close();
> }catch(java.io.IOException e)
> {
> System.out.println(e.toString());
> }
>
> Chris J.
> xt39096
> e-mail:- jenkins, christopher
>
> The Royal Bank of Scotland plc is registered in Scotland No 90312. Registered
>Office: 36 St Andrew Square, Edinburgh EH2 2YB.
>
> The Royal Bank of Scotland plc is regulated by IMRO, SFA and Personal Investment
>Authority.
>
> This e-mail message is confidential and for use by the addressee only. If the
>message is received by anyone other than the addressee, please return the message to
>the sender by replying to it and then delete the message from your computer.
>
> 'Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does
>not accept responsibility for changes made to this message after it was sent.'
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html