Sha256: 27ec8631403c8b2ed8caf64c8dcad77cee1693e79830843934f58ac95e23344c

Contents?: true

Size: 1.04 KB

Versions: 16

Compression:

Stored size: 1.04 KB

Contents

# -*- coding: binary -*-

module Rex
  module Java
    module Serialization
      module Model
        class Element

          attr_accessor :stream

          # Deserializes a Rex::Java::Serialization::Model::Element
          #
          # @param io [IO] the io to read from
          # @return [Rex::Java::Serialization::Model::Element] if deserialization succeeds
          # @return [nil] if deserialization doesn't succeed
          def self.decode(io, stream = nil)
            elem = self.new(stream)
            elem.decode(io)
          end

          # @param stream [Rex::Java::Serialization::Model::Stream] the stream where it belongs to
          def initialize(stream = nil)
            self.stream = stream
          end

          def decode(io)
            self
          end

          def encode
            ''
          end

          # Creates a print-friendly string representation
          #
          # @return [String]
          def to_s
            self.class.name.split('::').last
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
rex-java-0.1.7 lib/rex/java/serialization/model/element.rb
rex-java-0.1.6 lib/rex/java/serialization/model/element.rb
rex-2.0.13 lib/rex/java/serialization/model/element.rb
rex-2.0.12 lib/rex/java/serialization/model/element.rb
rex-2.0.11 lib/rex/java/serialization/model/element.rb
rex-java-0.1.5 lib/rex/java/serialization/model/element.rb
rex-java-0.1.4 lib/rex/java/serialization/model/element.rb
rex-java-0.1.3 lib/rex/java/serialization/model/element.rb
rex-java-0.1.2 lib/rex/java/serialization/model/element.rb
rex-java-0.1.1 lib/rex/java/serialization/model/element.rb
rex-java-0.1.0 lib/rex/java/serialization/model/element.rb
rex-2.0.10 lib/rex/java/serialization/model/element.rb
rex-2.0.9 lib/rex/java/serialization/model/element.rb
rex-2.0.8 lib/rex/java/serialization/model/element.rb
rex-2.0.7 lib/rex/java/serialization/model/element.rb
rex-2.0.5 lib/rex/java/serialization/model/element.rb