1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core.encoder;
15
16 import java.io.IOException;
17 import java.io.OutputStream;
18
19 import ch.qos.logback.core.spi.ContextAwareBase;
20
21 abstract public class EncoderBase<E> extends ContextAwareBase implements Encoder<E> {
22
23 protected boolean started;
24
25 protected OutputStream outputStream;
26
27 public void init(OutputStream os) throws IOException {
28 this.outputStream = os;
29 }
30
31 public boolean isStarted() {
32 return started;
33 }
34
35 public void start() {
36 started = true;
37 }
38
39 public void stop() {
40 started = false;
41 }
42 }
43