More Output

One of the core IO classes is called Output

Basic Output

All Output resources extend the Output trait so the following operations can be used on any Output resource (ReadableByteChannel or OutputStream for example).

This example does not try to cover all operations since they are covered in multiple examples like in the basic-read-write examples.

    import scalax.io._

    val output:Output = Resource.fromFileString("someFile")

    output.writeIntsAsBytes(1,2,3)
    output.write("hello")(Codec.UTF8)
    output.writeStrings(List("hello","world")," ")(Codec.UTF8)