Results 1 to 2 of 2

Thread: Writer's write() method? [resolved]

Threaded View

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Writer's write() method? [resolved]

    Does FileWriter's write() method inherited for the Writer
    abstract class have to be in a loop to execute properly?
    or can it just be called once?

    If i just call the write() method once i get no output.
    fw.write(buffer);

    But if i use a loop i get output to a file

    for(int i = 0; i <= 50; ++i){
    fw.write(buffer);
    }

    if i flush the FileWriter say like this:

    finally{
    fw.flush();
    fw.close();
    }

    i still get no output? Any suggestions?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width