6.51. kink/io/BIN_OUTPUT¶
6.51.1. BIN_OUTPUT.new¶
`new` makes an `output` which builds a `bin`.
The result `output` also provides `bin` method. It returns a `bin` val which joins bytes passed to `write` method.
.flush and .close methods of the result `output` do nothing.
Example
:BIN_OUTPUT.require_from('kink/io/')
:BIN.require_from('kink/')
:make_bin <- {
:Out = BIN_OUTPUT.new
Out.write(BIN.of(1 2 3))
Out.write(BIN.of(4))
Out.bin
}
stdout.print_line(make_bin.repr) # => (bin 0x01 0x02 0x03 0x04)