Class: UU::BinaryStore::UUBinaryData

Inherits:
Object
  • Object
show all
Defined in:
lib/uu_binarystore/binary_store/uu_binary_data.rb

Overview

Class representing binary Data

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data



8
9
10
# File 'lib/uu_binarystore/binary_store/uu_binary_data.rb', line 8

def data
  @data
end

Instance Method Details

#readObject

Download data from Binarystore

Examples:

pluto_list = binary_store.query(:query => "fileName = '#{file_name}'")

   File.open(file_name, 'wb') do |f|
    f << pluto_list.first.data.read # read data from BinaryStore
   end


50
51
52
53
54
55
56
# File 'lib/uu_binarystore/binary_store/uu_binary_data.rb', line 50

def read
  cmd = UU::OS::CMD::CommandClient.new("uu-binarystore-data", @session, :request_timeout => 0)
  params = {}
  params[:token] = @token if @token
  result = cmd.invoke('BinaryStore/getBinaryData', @uri, parameters: params)
  result.content.read
end