object method close : unit method write : string -> int -> unit end