Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

kernel.io

Class KI_OUTPUT_STREAM


Known direct descendants

KI_CHARACTER_OUTPUT_STREAM

Features

Invariants

indexing

description

Interface for output streams

library

Gobo Eiffel Kernel Library

copyright

Copyright (c) 2001, Eric Bezault and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2004/11/14 15:09:43 $

revision

$Revision: 1.14 $

deferred class

KI_OUTPUT_STREAM [G]

feature -- Access

name: STRING

-- Name of output stream

ensure
name_not_void: Result /= Void

feature -- Status report

is_closable: BOOLEAN

-- Can current output stream be closed?

ensure
is_open: Result implies is_open_write
is_open_write: BOOLEAN

-- Can items be written to output stream?

feature -- Basic operations

close

-- Try to close output stream if it is closable. Set
-- is_open_write to false if operation was successful.

require
is_closable: is_closable

feature -- Output

append (an_input_stream: KI_INPUT_STREAM [G])

-- Read items of an_input_stream until the end
-- of input is reached, and write these items to
-- current output stream.

require
is_open_write: is_open_write
an_input_stream_not_void: an_input_stream /= Void
an_input_stream_open_read: an_input_stream.is_open_read
ensure
end_of_input: an_input_stream.end_of_input
put (v: G)

-- Write v to output stream.

require
is_open_write: is_open_write

invariant

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end