how to send data coming from modem to a text file

hi frnds

I have a modem program in which i can receive sms and call details.What i want is i want to store those msgs to a text file.

The String variable to which that data is going is in readData() method of some Receiver.java file.

I tried like this

FileOutputStream file = new FileOutputStream(new File("modem.txt"));

Receiver rcvr = new Receiver(); // here i am getting error " the constructor Receiver() is undefined

String data = rcvr.readData(str);// here error is str cannot be resolved.

file.write(data); // here i am getting error "Syntax error on token "data", VariableDeclaratorId expected after this token"

can anyone help me ?

[696 byte] By [uramyajyothia] at [2007-10-3 9:24:10]
# 1
You need to go and read some Javadoc for all the methods you are trying to call. While you're there have a look in java.io for methods that can write a String.
ejpa at 2007-7-15 4:38:05 > top of Java-index,Archived Forums,Socket Programming...
# 2
cross-post
watertownjordana at 2007-7-15 4:38:05 > top of Java-index,Archived Forums,Socket Programming...