Reads at most maxlen bytes from the gziped stream but it blocks only if gzipreader has no data immediately available. If the optional outbuf argument is present, it must reference a String, which will receive the data. It raises EOFError
on end of file.
This method returns a list of notations that have been declared in the internal DTD
subset. Notations in the external DTD
subset are not listed.
Method
contributed by Henrik Martensson
Retrieves a named notation. Only notations declared in the internal DTD
subset can be retrieved.
Method
contributed by Henrik Martensson
Get an array of all Instruction
children. IMMUTABLE
Recursively walk dependencies of this spec, executing the block
for each hop.
Similar to read, but raises EOFError
at end of string instead of returning nil
, as well as IO#sysread
does.
Reads at most maxlen
bytes from the stream. If buf
is provided it must reference a string which will receive the data.
See IO#readpartial
for full details.
If a block is given, it prints out each of the elements encountered. Block parameters are (in that order):
depth: The recursion depth, plus one with each constructed value being encountered (Number)
offset: Current byte offset (Number)
header length: Combined length in bytes of the Tag and Length headers. (Number)
length: The overall remaining length of the entire data (Number)
constructed: Whether this value is constructed or not (Boolean)
tag_class: Current tag class (Symbol
)
tag: The current tag (Number)
der = File.binread('asn1data.der') OpenSSL::ASN1.traverse(der) do | depth, offset, header_len, length, constructed, tag_class, tag| puts "Depth: #{depth} Offset: #{offset} Length: #{length}" puts "Header length: #{header_len} Tag: #{tag} Tag class: #{tag_class} Constructed: #{constructed}" end
Returns whether the form contained multipart/form-data
returns a charset parameter in Content-Type field. It is downcased for canonicalization.
If charset parameter is not given but a block is given, the block is called and its result is returned. It can be used to guess charset.
If charset parameter and block is not given, nil is returned except text type in HTTP. In that case, “iso-8859-1” is returned as defined by RFC2616 3.7.1.
<!NOTATION …>
Called when an instruction is encountered. EG: <?xsl sheet=‘foo’?> @p name the instruction name; in the example, “xsl” @p instruction the rest of the instruction. In the example, “sheet=‘foo’”
<!NOTATION …>
The server hostname
The server hostname