Class GPGME::Data
In: lib/gpgme.rb
Parent: Object

A class for managing data buffers.

Methods

empty   encoding   encoding=   from_callbacks   from_fd   from_io   from_str   new   read   seek   write  

Constants

BLOCK_SIZE = 4096

Public Class methods

Create a new instance with an empty buffer.

Create a new instance from the specified callbacks.

Create a new instance from the specified file descriptor.

Create a new instance associated with a given IO.

Create a new instance with internal buffer.

Create a new instance.

The created data types depend on arg. If arg is nil, it creates an instance with an empty buffer. Otherwise, arg is either a string, an IO, or a Pathname.

Public Instance methods

Return the encoding of the underlying data.

Set the encoding to a given encoding of the underlying data object.

Read at most length bytes from the data object, or to the end of file if length is omitted or is nil.

Seek to a given offset in the data object according to the value of whence.

Write length bytes from buffer into the data object.

[Validate]