fun main() {
UpperCaseWriter(FileWriter("log.txt")).use {
it.write(
"""
This is a test
another line
SOME UPPERCASE TEXT
""".trimIndent())
}
}
public void write(String str) throws IOException {
write(str, 0, str.length())}
override fun write(str: String, off: Int, len: Int) {
super.write(str.uppercase(), off, len)
}