From 31ad1d99c497e43420c22a2c41412cf84f4048d1 Mon Sep 17 00:00:00 2001 From: chriscochrane Date: Mon, 14 Oct 2024 14:43:45 +0100 Subject: [PATCH] New WriterOutputStream API --- .../kotlin/net/corda/blobinspector/BlobInspectorTest.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/blobinspector/src/test/kotlin/net/corda/blobinspector/BlobInspectorTest.kt b/tools/blobinspector/src/test/kotlin/net/corda/blobinspector/BlobInspectorTest.kt index 210a5e9e11..fd00341ea5 100644 --- a/tools/blobinspector/src/test/kotlin/net/corda/blobinspector/BlobInspectorTest.kt +++ b/tools/blobinspector/src/test/kotlin/net/corda/blobinspector/BlobInspectorTest.kt @@ -55,7 +55,12 @@ class BlobInspectorTest { private fun run(resourceName: String): String { blobInspector.source = javaClass.getResource(resourceName) val writer = StringWriter() - blobInspector.run(PrintStream(WriterOutputStream(writer, UTF_8))) + val oStream = WriterOutputStream.builder() + .setCharset(UTF_8) + .setWriter(writer) + .get() + blobInspector.run(PrintStream(oStream)) + val output = writer.toString() println(output) return output