LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   JAVA: raf.write() question! (http://www.linuxquestions.org/questions/programming-9/java-raf-write-question-4175414447/)

nontas.v 07-02-2012 09:41 AM

JAVA: raf.write() question!
 
Good evening everyone,

My questions are:
1. To write something in a non-ascii file
raf.writeInt(int_variable) //for int
raf.writeBytes(string_variable) //for string

2. To write something in an ascii file e.g. .txt file
raf.write(variable) //for every kind of variable

Are these two right?? :/

P.S. of course raf files are initialized before I just ask which is the right way to write variables into a file

Regards, nontas

ntubski 07-08-2012 01:15 PM

It's hard to say whether what you wrote is correct without knowing what kind of object raf is.


All times are GMT -5. The time now is 06:50 PM.