ch.qos.logback.core.encoder

## Class EchoEncoder<E>

- java.lang.Object
- - ch.qos.logback.core.spi.ContextAwareBase
  - - ch.qos.logback.core.encoder.EncoderBase<E>
    - - ch.qos.logback.core.encoder.EchoEncoder<E>

All Implemented Interfaces:
  Encoder<E>, ContextAware, LifeCycle

    public class EchoEncoder<E>
    extends EncoderBase<E>

### Field Summary

### 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 and Description
`EchoEncoder()`

### Method Summary

All Methods Instance Methods Concrete Methods
`byte[]` `encode(E event)` Encode an event as bytes.
`byte[]` `footerBytes()` Get footer bytes.
`byte[]` `headerBytes()` Get header bytes.

### 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

#### EchoEncoder

    public EchoEncoder()

### Method Detail

#### encode

    public byte[] encode(E event)

Description copied from interface: `Encoder`
Encode an event as bytes.

#### footerBytes

    public byte[] footerBytes()

Description copied from interface: `Encoder`
Get 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.

#### headerBytes

    public byte[] headerBytes()

Description copied from interface: `Encoder`
Get header bytes. This method is typically called upon opening of an output stream.

Returns:
  header bytes. Null values are allowed.