need some help for questions!!

hi i need some help for a question, if i had an array d of doubles and rrrr is a reference to a java.io.FileOutputStream, what do i have to do in order to write the numbers in d to a text file connected to rrrr?
[247 byte] By [da_master_of_nuthina] at [2007-11-26 19:17:39]
# 1
a loop.is the file a text file, or a data file?if text, look at Double.toString( double )
mlka at 2007-7-9 21:32:09 > top of Java-index,Java Essentials,New To Java...
# 2
its a text file, what would i change if i am given an object of type java.io.File instead of the FileOutputStream?
da_master_of_nuthina at 2007-7-9 21:32:09 > top of Java-index,Java Essentials,New To Java...
# 3
Nothing, except that you stick the file instead of the stream into a FileWriter's c'tor.
CeciNEstPasUnProgrammeura at 2007-7-9 21:32:09 > top of Java-index,Java Essentials,New To Java...
# 4

I can not see you code. I have no idea what it looks like. As such, I can not make suggestions on what to change.

I can take a guess if you like.

You currently have code like:

public void writeDaLetters( OutputStream s ) { .. }

Well, add a second method which takes a File. In this method open a FileOutputStream, and pass it to the writeDaLetters( OutputStream s ) method.

mlka at 2007-7-9 21:32:09 > top of Java-index,Java Essentials,New To Java...
# 5
Next time please give your thread a meaningful subject line. "need some help for questions" tells us nothing, and the exclamaiton points are simply annoying.
jverda at 2007-7-9 21:32:09 > top of Java-index,Java Essentials,New To Java...