read an I/O stream byte by byte with each_byte: : each byte « File Directory « Ruby






read an I/O stream byte by byte with each_byte:



File.open("text.txt").each_byte { |byte| puts byte }

 

Related examples in the same category

1.each_byte is always associated with a block.
2.Count bytes