public class FileHandler extends OutputStreamHandler
outputLockhandlers, handlersUpdater| Constructor and Description |
|---|
FileHandler()
Construct a new instance with no formatter and no output file.
|
FileHandler(File file)
Construct a new instance with the given output file.
|
FileHandler(File file,
boolean append)
Construct a new instance with the given output file and append setting.
|
FileHandler(Formatter formatter)
Construct a new instance with the given formatter and no output file.
|
FileHandler(Formatter formatter,
File file)
Construct a new instance with the given formatter and output file.
|
FileHandler(Formatter formatter,
File file,
boolean append)
Construct a new instance with the given formatter, output file, and append setting.
|
FileHandler(String fileName)
Construct a new instance with the given output file.
|
FileHandler(String fileName,
boolean append)
Construct a new instance with the given output file and append setting.
|
| Modifier and Type | Method and Description |
|---|---|
File |
getFile()
Get the current output file.
|
void |
setAppend(boolean append)
Specify whether to append to the target file.
|
void |
setFile(File file)
Set the output file.
|
void |
setFileName(String fileName)
Set the output file by name.
|
getEncoding, setEncoding, setOutputStream, setWriterclose, doPublish, flush, preWrite, safeCloseaddHandler, checkAccess, checkAccess, clearHandlers, disableAccess, enableAccess, getHandlers, isAutoFlush, isCloseChildren, isEnabled, protect, publish, publish, removeHandler, setAutoFlush, setCloseChildren, setEnabled, setErrorManager, setFilter, setFormatter, setHandlers, setLevel, unprotectgetErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportErrorpublic FileHandler()
public FileHandler(Formatter formatter)
formatter - the formatterpublic FileHandler(Formatter formatter, File file) throws FileNotFoundException
formatter - the formatterfile - the fileFileNotFoundException - if the file could not be found on openpublic FileHandler(Formatter formatter, File file, boolean append) throws FileNotFoundException
formatter - the formatterfile - the fileappend - true to append, false to overwriteFileNotFoundException - if the file could not be found on openpublic FileHandler(File file) throws FileNotFoundException
file - the fileFileNotFoundException - if the file could not be found on openpublic FileHandler(File file, boolean append) throws FileNotFoundException
file - the fileappend - true to append, false to overwriteFileNotFoundException - if the file could not be found on openpublic FileHandler(String fileName) throws FileNotFoundException
fileName - the file nameFileNotFoundException - if the file could not be found on openpublic FileHandler(String fileName, boolean append) throws FileNotFoundException
fileName - the file nameappend - true to append, false to overwriteFileNotFoundException - if the file could not be found on openpublic void setAppend(boolean append)
append - true to append, false to overwritepublic void setFile(File file) throws FileNotFoundException
file - the fileFileNotFoundException - if an error occurs opening the filepublic File getFile()
public void setFileName(String fileName) throws FileNotFoundException
fileName - the file nameFileNotFoundException - if an error occurs opening the fileCopyright © 2017 JBoss by Red Hat. All rights reserved.