@Immutable
@CleanupObligation
public final class TFileWriter
extends java.io.OutputStreamWriter
FileWriter for writing plain old files
or entries in an archive file.
Mind that applications cannot write archive files directly - just their
entries!TConfig.setLenient(boolean),
TFileReader| Constructor and Description |
|---|
TFileWriter(java.io.File file)
Constructs a new
TFile writer. |
TFileWriter(java.io.File file,
boolean append)
Constructs a new
TFile writer. |
TFileWriter(java.io.File file,
boolean append,
java.nio.charset.Charset charset)
Constructs a new
TFile writer. |
TFileWriter(java.io.File file,
boolean append,
java.nio.charset.CharsetEncoder encoder)
Constructs a new
TFile writer. |
@CreatesObligation
public TFileWriter(java.io.File file)
throws java.io.IOException
TFile writer.
This writer uses the default character set for encoding characters
to bytes.file - a file to write.java.io.IOException - on any I/O error.@CreatesObligation
public TFileWriter(java.io.File file,
boolean append)
throws java.io.IOException
TFile writer.
This writer uses the default character set for encoding characters
to bytes.file - a file to write.append - iff true, then this writer appends the data to the
given file.java.io.IOException - on any I/O error.@CreatesObligation
public TFileWriter(java.io.File file,
boolean append,
java.nio.charset.Charset charset)
throws java.io.IOException
TFile writer.file - a file to write.append - iff true, then this writer appends the data to the
given file.charset - a character set for encoding characters to bytes.java.io.IOException - on any I/O error.@CreatesObligation
public TFileWriter(java.io.File file,
boolean append,
java.nio.charset.CharsetEncoder encoder)
throws java.io.IOException
TFile writer.file - a file to write.append - iff true, then this writer appends the data to the
given file.encoder - an encoder for encoding characters to bytes.java.io.IOException - on any I/O error.