Results for: "pstore"

Subclass of Zlib::Error. This error is raised when the zlib stream is currently in progress.

For example:

inflater = Zlib::Inflate.new
inflater.inflate(compressed) do
  inflater.inflate(compressed) # Raises Zlib::InProgressError
end

Zlib::ZStream is the abstract class for the stream which handles the compressed data. The operations are defined in the subclasses: Zlib::Deflate for compression, and Zlib::Inflate for decompression.

An instance of Zlib::ZStream has one stream (struct zstream in the source) and two variable-length buffers which associated to the input (next_in) of the stream and the output (next_out) of the stream. In this document, “input buffer” means the buffer for input, and “output buffer” means the buffer for output.

Data input into an instance of Zlib::ZStream are temporally stored into the end of input buffer, and then data in input buffer are processed from the beginning of the buffer until no more output from the stream is produced (i.e. until avail_out > 0 after processing). During processing, output buffer is allocated and expanded automatically to hold all output data.

Some particular instance methods consume the data in output buffer and return them as a String.

Here is an ascii art for describing above:

+================ an instance of Zlib::ZStream ================+
||                                                            ||
||     +--------+          +-------+          +--------+      ||
||  +--| output |<---------|zstream|<---------| input  |<--+  ||
||  |  | buffer |  next_out+-------+next_in   | buffer |   |  ||
||  |  +--------+                             +--------+   |  ||
||  |                                                      |  ||
+===|======================================================|===+
    |                                                      |
    v                                                      |
"output data"                                         "input data"

If an error occurs during processing input buffer, an exception which is a subclass of Zlib::Error is raised. At that time, both input and output buffer keep their conditions at the time when the error occurs.

Method Catalogue

Many of the methods in this class are fairly low-level and unlikely to be of interest to users. In fact, users are unlikely to use this class directly; rather they will be interested in Zlib::Inflate and Zlib::Deflate.

The higher level methods are listed below.

exception to wait for reading by EINPROGRESS. see IO.select.

No documentation available

Raised when the provided IP address is an invalid address.

Raised when the address family is invalid such as an address with an unsupported family, an address with an inconsistent family, or an address who’s family cannot be determined.

Raised when the address is an invalid length.

No documentation available

HTTPGenericRequest is the parent of the Net::HTTPRequest class.

Do not use this directly; instead, use a subclass of Net::HTTPRequest.

About the Examples

This class is the base class for Net::HTTP request classes. The class should not be used directly; instead you should use its subclasses, listed below.

Creating a Request

An request object may be created with either a URI or a string hostname:

require 'net/http'
uri = URI('https://jsonplaceholder.typicode.com/')
req = Net::HTTP::Get.new(uri)          # => #<Net::HTTP::Get GET>
req = Net::HTTP::Get.new(uri.hostname) # => #<Net::HTTP::Get GET>

And with any of the subclasses:

req = Net::HTTP::Head.new(uri) # => #<Net::HTTP::Head HEAD>
req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST>
req = Net::HTTP::Put.new(uri)  # => #<Net::HTTP::Put PUT>
# ...

The new instance is suitable for use as the argument to Net::HTTP#request.

Request Headers

A new request object has these header fields by default:

req.to_hash
# =>
{"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],
"accept"=>["*/*"],
"user-agent"=>["Ruby"],
"host"=>["jsonplaceholder.typicode.com"]}

See:

You can add headers or override default headers:

#   res = Net::HTTP::Get.new(uri, {'foo' => '0', 'bar' => '1'})

This class (and therefore its subclasses) also includes (indirectly) module Net::HTTPHeader, which gives access to its methods for setting headers.

Request Subclasses

Subclasses for HTTP requests:

Subclasses for WebDAV requests:

Parent class for redirection (3xx) HTTP response classes.

A redirection response indicates the client must take additional action to complete the request.

References:

Response class for Switching Protocol responses (status code 101).

The <tt>Switching Protocol<tt> response indicates that the server has received a request to switch protocols, and has agreed to do so.

References:

Response class for Non-Authoritative Information responses (status code 203).

The Non-Authoritative Information response indicates that the server is a transforming proxy (such as a Web accelerator) that received a 200 OK response from its origin, and is returning a modified version of the origin’s response.

References:

Response class for Permanent Redirect responses (status code 308).

This and all future requests should be directed to the given URI.

References:

Response class for Bad Request responses (status code 400).

The server cannot or will not process the request due to an apparent client error.

References:

Response class for Payment Required responses (status code 402).

Reserved for future use.

References:

Response class for Proxy Authentication Required responses (status code 407).

The client must first authenticate itself with the proxy.

References:

Response class for Request Timeout responses (status code 408).

The server timed out waiting for the request.

References:

Response class for Request Timeout responses (status code 408).

The server timed out waiting for the request.

References:

Response class for Length Required responses (status code 411).

The request did not specify the length of its content, which is required by the requested resource.

References:

Response class for Range Not Satisfiable responses (status code 416).

The request entity has a media type which the server or resource does not support.

References:

Response class for Upgrade Required responses (status code 426).

The client should switch to the protocol given in the Upgrade header field.

References:

Response class for Unavailable For Legal Reasons responses (status code 451).

A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.

References:

Response class for Internal Server Error responses (status code 500).

An unexpected condition was encountered and no more specific message is suitable.

References:

No documentation available
Search took: 5ms  ·  Total Results: 4418