@Immutable @CleanupObligation public final class TFileWriter extends 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(File file)
Constructs a new
TFile writer. |
TFileWriter(File file,
boolean append)
Constructs a new
TFile writer. |
TFileWriter(File file,
boolean append,
Charset charset)
Constructs a new
TFile writer. |
TFileWriter(File file,
boolean append,
CharsetEncoder encoder)
Constructs a new
TFile writer. |
close, flush, getEncoding, write, write, write
@CreatesObligation public TFileWriter(File file) throws IOException
TFile
writer.
This writer uses the default character set for encoding characters
to bytes.file
- a file to write.IOException
- on any I/O error.@CreatesObligation public TFileWriter(File file, boolean append) throws 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.IOException
- on any I/O error.@CreatesObligation public TFileWriter(File file, boolean append, Charset charset) throws 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.IOException
- on any I/O error.@CreatesObligation public TFileWriter(File file, boolean append, CharsetEncoder encoder) throws 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.IOException
- on any I/O error.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.