class BINARY_FILE_READ
Summary
Overview
creation features
exported features
  • recycle
    Do whatever needs to be done to free resources or recycle other objects when recycling this one
Skipping separators:
To read one number at a time:
To read one line or one word at a time:
Other features:
  • path: STRING
    Not Void when connected to the corresponding file on the disk.
connect_to (new_path: STRING)
effective procedure
Open binary file for reading.
disconnect
effective procedure
Disconnect from any file.
can_unread_character: BOOLEAN
effective function
read_byte
effective procedure
Read a byte and assign it to last_byte.
last_byte: INTEGER_32
effective function
Last byte read with read_byte.
read_integer_16_native_endian
effective procedure
Read in the same order as the machine running this code.
read_integer_16_big_endian
effective procedure
Read a big endian value is the file.
read_integer_16_little_endian
effective procedure
Read a little endian value is the file.
last_integer_16: INTEGER_32
writable attribute
Last byte read with read_integer_16_*.
read_integer_32_native_endian
effective procedure
Read in the same order as the machine running this code.
read_integer_32_big_endian
effective procedure
Read a big endian value is the file.
read_integer_32_little_endian
effective procedure
Read a little endian value is the file.
last_integer_32: INTEGER_32
writable attribute
end_of_input: BOOLEAN
writable attribute
end_of_input means the previous attempt in character reading failed because the end has been reached.
seek (new_offset: INTEGER_32)
effective procedure
Next read will start at position offset, counted from the begining of the file.
offset: INTEGER_64
effective function
read_character
effective procedure
If read_character fail, end_of_input is set.
read_line_in (buffer: STRING)
effective procedure
Same job as read_line but storage is directly done in buffer.
read_available_in (buffer: STRING, limit: INTEGER_32)
effective procedure
Same job as read_available but storage is directly done in buffer.
unread_character
effective procedure
last_character: CHARACTER
effective function
detach
effective procedure
Shake off the filter.
event_can_read: EVENT_DESCRIPTOR
effective function
is_connected: BOOLEAN
deferred function
True if the stream is connected.
descriptor: INTEGER_32
effective function
Some OS-dependent descriptor.
has_descriptor: BOOLEAN
effective function
True if that stream can be associated to some OS-meaningful descriptor.
can_disconnect: BOOLEAN
deferred function
True if the stream can be safely disconnected (without data loss, etc.)
recycle
effective procedure
Do whatever needs to be done to free resources or recycle other objects when recycling this one
can_read_character: BOOLEAN
deferred function
Note that this state is usually temporary.
can_read_line: BOOLEAN
deferred function
valid_last_character: BOOLEAN
deferred function
is_filtered: BOOLEAN
deferred function
skip_separators
effective procedure
Skip all separators (see is_separator of class CHARACTER) and make the first non-separator available in last_character.
skip_separators_using (separators: STRING)
effective procedure
Same job as skip_separators using the separators set.
skip_remainder_of_line
effective procedure
Skip all the remainder of the line including the end of line delimiter itself.
read_integer
effective procedure
Read an integer according to the Eiffel syntax.
last_integer: INTEGER_32
writable attribute
Last integer read using read_integer.
valid_last_integer: BOOLEAN
writable attribute
Was the last call to read_integer successful ?
last_real: REAL_64
writable attribute
Last real read with read_real.
valid_last_real: BOOLEAN
writable attribute
Was the last call to read_real successful ?
read_real
effective procedure
Read a REAL and make the result available in last_real.
last_string: STRING
once function
Access to the unique common buffer to get for example the result computed by read_line, read_word, newline, etc.
read_line
effective procedure
Read a complete line ended by '%N' or end_of_input.%
read_available (limit: INTEGER_32)
effective procedure
Read as many characters as possible, as long as the stream does not block and up to the given limit.
read_word
effective procedure
Read a word using is_separator of class CHARACTER.
newline
effective procedure
Consume input until newline ('%N') is found.
reach_and_skip (keyword: STRING)
effective procedure
Try to skip enough characters in order to reach the keyword which is skipped too.
read_word_using (separators: STRING)
effective procedure
Same job as read_word using separators.
read_tail_in (str: STRING)
effective procedure
Read all remaining character of the stream in str.
path: STRING
writable attribute
Not Void when connected to the corresponding file on the disk.