core :: Reader :: read_block
To be used with Writer::write_block
.
Returns a truncated string when an error is pending (last_error != null
).
# Read the length as a 64 bits integer, then the content of the block
#
# To be used with `Writer::write_block`.
#
# Returns a truncated string when an error is pending (`last_error != null`).
fun read_block: String
do
var length = read_int64
if length == 0 then return ""
return read_bytes(length).to_s
end
lib/binary/binary.nit:191,2--201,4