Class: Rex::Java::Serialization::Model::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/java/serialization/model/element.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stream = nil) ⇒ Element

Returns a new instance of Element.

Parameters:



22
23
24
# File 'lib/rex/java/serialization/model/element.rb', line 22

def initialize(stream = nil)
  self.stream = stream
end

Instance Attribute Details

#streamObject

Returns the value of attribute stream.



9
10
11
# File 'lib/rex/java/serialization/model/element.rb', line 9

def stream
  @stream
end

Class Method Details

.decode(io, stream = nil) ⇒ Rex::Java::Serialization::Model::Element?

Deserializes a Rex::Java::Serialization::Model::Element

Parameters:

  • io (IO)

    the io to read from

Returns:



16
17
18
19
# File 'lib/rex/java/serialization/model/element.rb', line 16

def self.decode(io, stream = nil)
  elem = self.new(stream)
  elem.decode(io)
end

Instance Method Details

#decode(io) ⇒ Object



26
27
28
# File 'lib/rex/java/serialization/model/element.rb', line 26

def decode(io)
  self
end

#encodeObject



30
31
32
# File 'lib/rex/java/serialization/model/element.rb', line 30

def encode
  ''
end

#to_sString

Creates a print-friendly string representation

Returns:

  • (String)


37
38
39
# File 'lib/rex/java/serialization/model/element.rb', line 37

def to_s
  self.class.name.split('::').last
end