aspose file tools
The moose likes I/O and Streams and the fly likes charArrayWriter Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "charArrayWriter" Watch "charArrayWriter" New topic
Author

charArrayWriter

yasir badshah
Greenhorn

Joined: Mar 14, 2002
Posts: 5
import java.io.*;
class a{
public static void main(String[] args)throws Exception{
CharArrayWriter caw=new CharArrayWriter();
caw.write(65);
caw.close();
caw.writeTo("c:/yasir.txt");
}}
the chararaywriter is not writing in the file,i have tried lot of time,no compile time error& no run time exception so what i do tell me.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Yasir,
Here's what you need to do:

You have to writeTo a FileWriter to get output to a file when using a writer.
Hope this helps
Michael SCJP


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
 
 
subject: charArrayWriter
 
Threads others viewed
Socket answer in multiple parts, Client receive only 1
chararraywriter
How can final and transient be used in a variable declaraion?
What is the fastest way to loop in java in huge data structure
Caching rendered html in jsp
MyEclipse, The Clear Choice