Move Writer creation out of WriterImpls

This commit is contained in:
AsamK 2021-11-07 15:13:53 +01:00
parent b5eef3ccad
commit 5dd602614c
4 changed files with 23 additions and 22 deletions

View file

@ -2,10 +2,7 @@ package org.asamk.signal;
import org.slf4j.helpers.MessageFormatter;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
public final class PlainTextWriterImpl implements PlainTextWriter {
@ -14,8 +11,8 @@ public final class PlainTextWriterImpl implements PlainTextWriter {
private PlainTextWriter indentedWriter;
public PlainTextWriterImpl(final OutputStream outputStream) {
this.writer = new BufferedWriter(new OutputStreamWriter(outputStream));
public PlainTextWriterImpl(final Writer writer) {
this.writer = writer;
}
@Override