![]() |
Section 8.10.3.7:
|
![]() |
types SAME = BIN_FILE_CURSOR ;
This class implements a model of a cursor (and associated buffer) into a binary file, inheriting all but one feature definition from the abstract class $FILE_CURSORS{OCTET,BINSTR}.
The following routines are required to be implemented for this class in accordance with the specifications given in the abstract class $FILE_CURSORS of which $FILE_CURSORS{OCTET,BINSTR} is a sub-type :-
The following 'output' routines are required to be implemented for this class in accordance with the specifications given in the abstract class $FILE_CURSORS{OCTET,BINSTR} :-
This is the single 'input' feature associated with the binary file cursor. It allows for arbitrary reading of octets from the current position, updating that position as reading continues.
get(self : SAME, count : CARD) res : [FBINSTR]
pre readable(self) and (count > 0)
post (at_end(self) and res = nil) or let idx = position(self) in res = buffer(idx, ..., (idx + count))
This routine returns the next count items in the file in a binary string buffer. If there is insufficient data in the file then void is returned.
![]() |
Language Index | ![]() |
Library Index | ![]() |
Input/Output Index |
Comments
or enquiries should be made toKeith Hopper. Page last modified: Wednesday, 4 April 2001. |
![]() |