@MinDoc(copyright="Copyright 1997 - 2000, 2016 A. Weinert", author="Albrecht Weinert", version="like enclosing class FileHelper", lastModified="like enclosing class FileHelper", lastModifiedBy="like enclosing class FileHelper", usage="use for output to a File", purpose="simplifies greatly the output to a file") public static class FileHelper.OS extends FileOutputStream
Modifier and Type | Field and Description |
---|---|
boolean |
append
Connected to a file in append mode.
|
File |
f
The file.
|
BufferedWriter |
osw
The output Writer.
|
PrintWriter |
pw
The output PrintWriter.
|
Constructor and Description |
---|
OS(File f)
The output for the (set) File, overwriting.
|
OS(File f,
boolean append)
The output for the (set) File.
|
OS(File f,
boolean append,
Charset outEncoding)
The output for the (set) File.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closing the output (file / stream).
|
finalize, getChannel, getFD, write, write, write
flush
public volatile PrintWriter pw
public final File f
public final boolean append
public volatile BufferedWriter osw
public OS(File f, boolean append) throws IOException
append
- true: do append instead of overwriteIOException
- like FileOutputStream(..)public OS(File f, boolean append, Charset outEncoding) throws IOException
append
- true: do append instead of overwriteoutEncoding
- character encoding for the PrintWriterIOException
- like FileOutputStream(..)public OS(File f) throws IOException
IOException
- like FileOutputStream(..)public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class FileOutputStream