[ Web Proxy ]
URL:
Viewing: https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/io/FileWriter.html [Back]  [Original]

FileWriter (Java SE 24 & JDK 24)
Contents 
Hide sidebar ❮❯ Show sidebar
  1. Description
  2. Field Summary
  3. Constructor Summary
  4. Method Summary
  5. Constructor Details
    1. FileWriter(String)
    2. FileWriter(String, boolean)
    3. FileWriter(File)
    4. FileWriter(File, boolean)
    5. FileWriter(FileDescriptor)
    6. FileWriter(String, Charset)
    7. FileWriter(String, Charset, boolean)
    8. FileWriter(File, Charset)
    9. FileWriter(File, Charset, boolean)

Class FileWriter

java.lang.Object
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class FileWriter extends OutputStreamWriter
Writes text to character files using a default buffer size. Encoding from characters to bytes uses either a specified charset or the default charset.

Whether or not a file is available or may be created depends upon the underlying platform. Some platforms, in particular, allow a file to be opened for writing by only one FileWriter (or other file-writing object) at a time. In such situations the constructors in this class will fail if the file involved is already open.

The FileWriter is meant for writing streams of characters. For writing streams of raw bytes, consider using a FileOutputStream.

Since:
1.1
See Also:


Web Proxy Viewer  |  New URL  |  Original Page