class type mime_body_ro =This is the read-only version of a MIME body. There are only methods to read the body contents.object
..end
The value of the body can be returned either as string
, or as
object channel. Both ways are possible independently of where
the value is stored, in-memory, or as external file.
method value : string
value
method returns the _decoded_ body,
i.e. transfer encodings are removed before the value is passed
back.
When the body is stored in an external file, this method
reads the complete file into memory.
method store : store
method open_value_rd : unit -> Netchannels.in_obj_channel
let ch = body # open_value_rd () in
try
while true do
let line = ch # input_line() in
... (* do something *)
done;
assert false; (* never reached *)
with
End_of_file ->
ch # close_in()
As value
, this method returns the value in decoded form.
This method is quite economical with the resources, and takes
only as much memory as needed for the channel operations.
method finalize : unit -> unit