public class BufferedFileWriter extends OutputStreamWriter
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CHARACTERSET_NAME
The default character set name.
|
Constructor and Description |
---|
BufferedFileWriter(File file)
Constructs a BufferedFileWriter.
|
BufferedFileWriter(File file,
boolean append)
Constructs a BufferedFileWriter.
|
BufferedFileWriter(File file,
boolean append,
String charsetName)
Constructs a BufferedFileWriter.
|
BufferedFileWriter(String fileName)
Constructs a BufferedFileWriter.
|
BufferedFileWriter(String fileName,
boolean append)
Constructs a BufferedFileWriter.
|
BufferedFileWriter(String fileName,
boolean append,
String charsetName)
Constructs a BufferedFileWriter.
|
close, flush, getEncoding, write, write, write
public static final String DEFAULT_CHARACTERSET_NAME
public BufferedFileWriter(String fileName) throws IOException
Defaults to append=false and default character set.
fileName
- the file nameIOException
- if the operation failspublic BufferedFileWriter(String fileName, boolean append) throws IOException
Uses default character set.
fileName
- the file nameappend
- whether to append to the file if a file already existsIOException
- if the operation failspublic BufferedFileWriter(String fileName, boolean append, String charsetName) throws IOException
fileName
- the file nameappend
- whether to append to the file if a file already existscharsetName
- the character set nameIOException
- if the operation failspublic BufferedFileWriter(File file) throws IOException
Defaults to append=false and default character set.
file
- the FileIOException
- if the operation failspublic BufferedFileWriter(File file, boolean append) throws IOException
Uses default character set.
file
- the Fileappend
- whether to append to the file if a file already existsIOException
- if the operation failspublic BufferedFileWriter(File file, boolean append, String charsetName) throws IOException
file
- the Fileappend
- whether to append to the file if a file already existscharsetName
- the character set nameIOException
- if the operation failsCopyright © 2023. All rights reserved.