New WriterOutputStream API

This commit is contained in:
chriscochrane 2024-10-14 14:43:45 +01:00
parent 94bd9dceac
commit 31ad1d99c4
No known key found for this signature in database
GPG Key ID: E20C3731120606AB

View File

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