Skip to content

Commit

Permalink
Add forgotten override fun write(str: String?)
Browse files Browse the repository at this point in the history
  • Loading branch information
RZR-UA committed Dec 6, 2024
1 parent b1d3b4a commit edb8e73
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ class SinkStringWriter(sink: Sink) : StringWriter() {
bufferedSink.writeUtf8CodePoint(c)
}

@Throws(IOException::class)
override fun write(str: String?) {
if (str != null) {
bufferedSink.writeUtf8(str)
}
}

@Throws(IOException::class)
override fun write(cbuf: CharArray, off: Int, len: Int) {
bufferedSink.writeUtf8(String(cbuf, off, len))
Expand Down

0 comments on commit edb8e73

Please sign in to comment.