@Immutable @CleanupObligation public final class TFileReader extends InputStreamReader
FileReader
for reading plain old files
or entries in an archive file.
Mind that applications cannot read archive files directly - just their
entries!TFileWriter
Constructor and Description |
---|
TFileReader(File file)
Constructs a new
TFile reader. |
TFileReader(File file,
Charset charset)
Constructs a new
TFile reader. |
TFileReader(File file,
CharsetDecoder decoder)
Constructs a new
TFile reader. |
TFileReader(TFile file)
Constructs a new
TFile reader. |
TFileReader(TFile file,
CharsetDecoder decoder)
Constructs a new
TFile reader. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
getEncoding, read, read, ready
@CreatesObligation public TFileReader(File file) throws FileNotFoundException
TFile
reader.
This reader uses the default character set for decoding bytes to
characters.file
- a file to read.FileNotFoundException
- on any I/O failure.@CreatesObligation public TFileReader(File file, Charset charset) throws FileNotFoundException
TFile
reader.file
- a file to read.charset
- a character set for decoding bytes to characters.FileNotFoundException
- on any I/O failure.@CreatesObligation public TFileReader(File file, CharsetDecoder decoder) throws FileNotFoundException
TFile
reader.file
- a file to read.decoder
- a decoder for decoding bytes to characters.FileNotFoundException
- on any I/O failure.@CreatesObligation public TFileReader(TFile file) throws FileNotFoundException
TFile
reader.
This reader uses the default character set for decoding bytes to
characters.
TODO: Remove this redundant constructor in TrueZIP 8.
file
- a file to read.FileNotFoundException
- on any I/O failure.@CreatesObligation public TFileReader(TFile file, CharsetDecoder decoder) throws FileNotFoundException
TFile
reader.
TODO: Remove this redundant constructor in TrueZIP 8.
file
- a file to read.decoder
- a decoder for decoding bytes to characters.FileNotFoundException
- on any I/O failure.@DischargesObligation public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStreamReader
IOException
Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.