4.47. kink/io/BIN_OUTPUT

4.47.1. BIN_OUTPUT.new

`new` makes an output which builds bin from bytes.

The result output also has `bin` method which returns the built bin.

Example:

:BIN_OUTPUT.require_from('kink/io/')
:BIN.require_from('kink/')

:make_bin <- {
  :Out = BIN_OUTPUT.new
  Out.write_bin(BIN.of(1 2 3))
  Out.write_byte(4)
  Out.close
  Out.bin
}
stdout.print_line(make_bin.repr) # => BIN.of(0x01 0x02 0x03 0x04)

.close and .flush method do nothing for the result output, thus you don't have to call .close for the output.