Class: AudioTag::ID3::StreamSection
- Inherits:
-
StreamReader
- Object
- StreamReader
- AudioTag::ID3::StreamSection
- Defined in:
- lib/audio_tag/id3/stream_section.rb
Overview
The overridden extract! method may not need to read all data within the stream section (for example if it contains embedded binary data). Therefore the initializer will also ensure that the stream is advanced to the end of the current section after extraction to prevent serial sections from overlapping.
Instance Attribute Summary
Attributes inherited from StreamReader
Instance Method Summary collapse
-
#initialize(stream) ⇒ StreamSection
constructor
A new instance of StreamSection.
Methods inherited from StreamReader
#read, #read!, #read_byte, #read_byte!, #read_bytes, #read_bytes!, #read_bytes_until, #read_bytes_until!, #read_until, #read_until!
Constructor Details
#initialize(stream) ⇒ StreamSection
Returns a new instance of StreamSection.
23 24 25 26 27 28 29 |
# File 'lib/audio_tag/id3/stream_section.rb', line 23 def initialize(stream) super @first_pos = stream.pos extract! && advance! end |