WriterAbstractFormatPatternWriter, JsonWriterpublic abstract class AbstractFileBasedWriter extends AbstractWriter
| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractFileBasedWriter(Map<String,String> properties) |
| Modifier and Type | Method | Description |
|---|---|---|
protected static ByteArrayWriter |
createByteArrayWriter(String fileName,
boolean append,
boolean buffered,
boolean threadSafe,
boolean shared,
Charset charset) |
Creates a
ByteArrayWriter for a file. |
protected Charset |
getCharset() |
Extracts the charset from configuration.
|
protected static byte[] |
getCharsetHeader(Charset charset) |
Generate the header for the passed charset (for example BOM for UTF-16).
|
protected String |
getFileName() |
Extracts the log file name from configuration.
|
getBooleanValue, getStringValue, getStringValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, flush, getRequiredLogEntryValues, writeprotected String getFileName()
IllegalArgumentException - Log file is not defined in configurationprotected Charset getCharset()
protected static ByteArrayWriter createByteArrayWriter(String fileName, boolean append, boolean buffered, boolean threadSafe, boolean shared, Charset charset) throws IOException
ByteArrayWriter for a file.fileName - Name of file to open for writingappend - An already existing file should be continuedbuffered - Output should be bufferedthreadSafe - Created writer must be thread-safeshared - Output file is shared with other processescharset - Charset used by the writerIOException - Log file cannot be opened for write accessprotected static byte[] getCharsetHeader(Charset charset)
charset - Charset for which the header should be generated forCopyright © 2026. All rights reserved.