def read(length = nil)
      if length
        GPGME::gpgme_data_read(self, length)
      else
        buf = String.new
        loop do
          s = GPGME::gpgme_data_read(self, BLOCK_SIZE)
          break unless s
          buf << s
        end
        buf
      end
    end
def read(length = nil)
      if length
        GPGME::gpgme_data_read(self, length)
      else
        buf = String.new
        loop do
          s = GPGME::gpgme_data_read(self, BLOCK_SIZE)
          break unless s
          buf << s
        end
        buf
      end
    end
class << self
 Read at most +length+ bytes from the data object, or to the end
 of file if +length+ is omitted or is +nil+.

 @example
   data = GPGME::Data.new("From a string")
   data.read # => "From a string"

 @example
   data = GPGME::Data.new("From a string")
   data.read(4) # => "From"