Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-02-2012, 08:41 AM   #1
Registered: Jan 2012
Posts: 32

Rep: Reputation: Disabled
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
Old 07-08-2012, 12:15 PM   #2
Senior Member
Registered: Nov 2005
Distribution: Arch
Posts: 3,093

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


java, write

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Yet another java classpath question --- java.lang.NoClassDefFoundError Jama raequin Programming 1 12-29-2009 01:04 PM
Java sound: line.write() returns 0 eantoranz Programming 1 10-15-2007 09:13 PM
How to binary-write in Java in little endian? kornerr Programming 6 12-12-2006 06:00 AM
Can not write to file in Java irfanhab Programming 7 12-05-2005 12:01 AM
java io write file dummyagain Programming 3 02-23-2005 04:50 PM

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration