From f71f78643ea8bfc74dc79908cdd76bf27fb0698d Mon Sep 17 00:00:00 2001 From: Sebastian Toepfer <61313468+sebastian-toepfer@users.noreply.github.com> Date: Mon, 11 Dec 2023 13:20:33 +0100 Subject: [PATCH] replace bytearrayoutputstream with outputstream --- .../stream/JsonArrayStreamMediaPrintableAdapter.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/media-json-api/src/main/java/io/github/sebastiantoepfer/ddd/media/json/stream/JsonArrayStreamMediaPrintableAdapter.java b/media-json-api/src/main/java/io/github/sebastiantoepfer/ddd/media/json/stream/JsonArrayStreamMediaPrintableAdapter.java index fa2dac7..2d8db53 100644 --- a/media-json-api/src/main/java/io/github/sebastiantoepfer/ddd/media/json/stream/JsonArrayStreamMediaPrintableAdapter.java +++ b/media-json-api/src/main/java/io/github/sebastiantoepfer/ddd/media/json/stream/JsonArrayStreamMediaPrintableAdapter.java @@ -26,9 +26,9 @@ import io.github.sebastiantoepfer.ddd.common.Printable; import jakarta.json.Json; import jakarta.json.stream.JsonGenerator; -import java.io.ByteArrayOutputStream; import java.io.Flushable; import java.io.IOException; +import java.io.OutputStream; import java.util.Objects; import java.util.function.Function; @@ -37,15 +37,15 @@ public final class JsonArrayStreamMediaPrintableAdapter implements Flushable, Au private final JsonGenerator generator; private final Function> mediaDecorator; - public JsonArrayStreamMediaPrintableAdapter(final ByteArrayOutputStream baos) { - this(baos, m -> m); + public JsonArrayStreamMediaPrintableAdapter(final OutputStream os) { + this(os, m -> m); } public JsonArrayStreamMediaPrintableAdapter( - final ByteArrayOutputStream baos, + final OutputStream os, final Function> mediaDecorator ) { - this(Json.createGenerator(baos), mediaDecorator); + this(Json.createGenerator(os), mediaDecorator); } private JsonArrayStreamMediaPrintableAdapter(