class SizedReader

Defined in:

nghttp/io/size_reader.cr

Instance Method Summary

Instance methods inherited from class IO

pack(spec, *a) pack, reunpack(src, dst, *vars) reunpack, unpack(spec) unpack

Instance Method Detail

def write(slice : Bytes) : Nil #
Description copied from class IO

Writes the contents of slice into this IO.

io = IO::Memory.new
slice = Bytes.new(4) { |i| ('a'.ord + i).to_u8 }
io.write(slice)
io.to_s # => "abcd"

[View source]