Iostream.InInput stream.
Input stream.
class type t = object ... endAn input stream, i.e an incoming stream of bytes.
val create :
?close:(unit -> unit) ->
input:(bytes -> int -> int -> int) ->
unit ->
tval empty : tEmpty input, contains 0 bytes.
val of_string : ?off:int -> ?len:int -> string -> tAn input channel reading from the string.
val of_bytes : ?off:int -> ?len:int -> bytes -> tAn input channel reading from the bytes buffer. See of_string for more details.
val input : t -> bytes -> int -> int -> intRead bytes into the given buffer. This returns 0 only if the stream has reached its end.
val input_all : ?buf:bytes -> t -> stringinput_all ic reads the whole content of ic into a string.
val really_input : t -> bytes -> int -> int -> unitSame as input, but reads exactly the demanded amount of bytes.
val really_input_string : t -> int -> stringreally_input_string ic n reads exactly n bytes of ic and returns them as a string.
val close : t -> unitClose the input stream. This is idempotent.
val copy_into : ?buf:bytes -> t -> Fuseau.Iostream.Out.t -> unitCopy the whole stream into the given output.
val of_unix_fd : ?close_noerr:bool -> ?buf:bytes -> Unix.file_descr -> t