class IO::Sized

Overview

An IO that wraps another IO, setting a limit for the number of bytes that can be read.

io = IO::Memory.new "abcde"
sized = IO::Sized.new(io, read_size: 3)

sized.gets_to_end # => "abc"
sized.gets_to_end # => ""
io.gets_to_end    # => "de"

Defined in:

perf_tools/mem_prof.cr

Class methods inherited from class Object

_fields_offsets _fields_offsets