Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Menu
Read 4 bytes starting at byte 2 : IO.read « File Directory « Ruby
Ruby
File Directory
IO.read
Read 4 bytes starting at byte 2
data = IO.read(
"data"
, 4, 2) # Read 4 bytes starting at
byte
2
Related examples in the same category
1.
Read and return the entire file
2.
Read from byte 6 to end-of-file