class sub_stream :
?len:int -> ?delimiter:string -> in_obj_stream ->
lenspecifies the maximum length of the sub stream.
delimiteris an arbitrary string that indicates the end of the sub stream (the delimiter is not part of the sub stream; i.e. the sub stream ends immediately before the delimiter).
While reading from the sub stream, not only the current position of the sub stream moves, but also the current position of the main stream. This means that it must be avoided to read data from the main stream while the sub stream is in use. The typical pattern is: