LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 07-02-2012, 08:41 AM   #1
nontas.v
Member
 
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
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,432

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


Reply

Tags
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 01:02 PM.

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