D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
IO
/
Buffer
/
Filename :
read-i.ri
back
Copy
U:RDoc::AnyMethod[iI" read:ETI"IO::Buffer#read;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"MRead at least +length+ bytes from the +io+, into the buffer starting at ;TI":+offset+. If an error occurs, return <tt>-errno</tt>.;To:RDoc::Markup::BlankLine o; ; [I"NIf +length+ is not given or +nil+, it defaults to the size of the buffer ;TI".minus the offset, i.e. the entire buffer.;T@o; ; [I"IIf +length+ is zero, exactly one <tt>read</tt> operation will occur.;T@o; ; [I"NIf +offset+ is not given, it defaults to zero, i.e. the beginning of the ;TI"buffer.;T@o:RDoc::Markup::Verbatim; [I"(IO::Buffer.for('test') do |buffer| ;TI" p buffer ;TI" # => ;TI"1 # <IO::Buffer 0x00007fca40087c38+4 SLICE> ;TI". # 0x00000000 74 65 73 74 test ;TI"7 buffer.read(File.open('/dev/urandom', 'rb'), 2) ;TI" p buffer ;TI" # => ;TI": # <IO::Buffer 0x00007f3bc65f2a58+4 EXTERNAL SLICE> ;TI". # 0x00000000 05 35 73 74 .5st ;TI"end;T:@format0: @fileI"io_buffer.c;T:0@omit_headings_from_table_of_contents_below0I";read(io, [length, [offset]]) -> read length or -errno ;T0[ I"(*args);T@(FI"Buffer;TcRDoc::NormalClass00