- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.encoder.EncoderBase<E>
-
- ch.qos.logback.core.testUtil.DummyEncoder<E>
-
- All Implemented Interfaces:
Encoder<E>,ContextAware,LifeCycle
public class DummyEncoder<E> extends EncoderBase<E>
-
-
Field Summary
Fields Modifier and Type Field Description static StringDUMMY-
Fields inherited from class ch.qos.logback.core.encoder.EncoderBase
started
-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description DummyEncoder()DummyEncoder(String val)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]encode(E event)Encode an event as bytes.byte[]footerBytes()Get footer bytes.CharsetgetCharset()StringgetFileFooter()StringgetFileHeader()byte[]headerBytes()Get header bytes.voidsetCharset(Charset charset)voidsetFileFooter(String fileFooter)voidsetFileHeader(String fileHeader)-
Methods inherited from class ch.qos.logback.core.encoder.EncoderBase
isStarted, start, stop
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
-
-
-
Constructor Detail
-
DummyEncoder
public DummyEncoder()
-
DummyEncoder
public DummyEncoder(String val)
-
-
Method Detail
-
getCharset
public Charset getCharset()
-
setCharset
public void setCharset(Charset charset)
-
encode
public byte[] encode(E event)
Description copied from interface:EncoderEncode an event as bytes.
-
headerBytes
public byte[] headerBytes()
Description copied from interface:EncoderGet header bytes. This method is typically called upon opening of an output stream.- Returns:
- header bytes. Null values are allowed.
-
footerBytes
public byte[] footerBytes()
Description copied from interface:EncoderGet footer bytes. This method is typically called prior to the closing of the stream where events are written.- Returns:
- footer bytes. Null values are allowed.
-
getFileHeader
public String getFileHeader()
-
setFileHeader
public void setFileHeader(String fileHeader)
-
getFileFooter
public String getFileFooter()
-
setFileFooter
public void setFileFooter(String fileFooter)
-
-