Class: Jabber::Bytestreams::IqSiFileRange

Class | Jabber::Bytestreams::IqSiFileRange
In: | lib/xmpp4r/bytestreams/iq/si.rb
Parent: | XMPPElement

Information for ranged transfers

### Methods

length length= new offset offset=

### Public Class methods

new(offset=nil, length=nil)

[Source]

         # File lib/xmpp4r/bytestreams/iq/si.rb, line 174
    174:       def initialize(offset=nil, length=nil)
    175:         super()
    176:
    177:         self.offset = offset
    178:         self.length = length
    179:       end

### Public Instance methods

length()

File length (if not to transfer whole file)

[Source]

         # File lib/xmpp4r/bytestreams/iq/si.rb, line 195
    195:       def length
    196:         (attributes['length'] =~ /^\d+$/) ? attributes['length'].to_i : nil
    197:       end

length=(o)

Set file length

[Source]

         # File lib/xmpp4r/bytestreams/iq/si.rb, line 201
    201:       def length=(o)
    202:         attributes['length'] = (o ? o.to_s : nil)
    203:       end

offset()

File offset (for continuing an interrupted transfer)

[Source]

         # File lib/xmpp4r/bytestreams/iq/si.rb, line 183
    183:       def offset
    184:         (attributes['offset'] =~ /^\d+$/) ? attributes['offset'].to_i : nil
    185:       end

offset=(o)

Set file offset

[Source]

         # File lib/xmpp4r/bytestreams/iq/si.rb, line 189
    189:       def offset=(o)
    190:         attributes['offset'] = (o ? o.to_s : nil)
    191:       end

[Validate]