Class Infile
Infile Bridge.
Link to GitHub: Source File.
- Author:
- Simula Standard, S-Port: The Environment Interface, Øystein Myhre Andersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BufferedReaderThe BufferedReader used.private StringUtility variableprivate static StringUtility variableFields inherited from class Dataset
FIL_DIRECTBYTEFILE, FIL_DIRECTFILE, FIL_INBYTEFILE, FIL_INFILE, FIL_OUTBYTEFILE, FIL_OUTFILE, FIL_PRINTFILE, fileAction, fileName, fileType, KEY_SYSIN, KEY_SYSOUT, KEY_SYSTRACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclfile()Close the underlying fileintinimage(ObjectAddress chrAddr, int nchr) Procedure inimage.private static intUtility: read a character with timeoutprivate static StringreadLine()Utility: read a linestatic intsysinInimage(ObjectAddress chrAddr, int nchr) Reads a line from the underlying file into a character areaMethods inherited from class ImageFile
breakOutimage, outimageMethods inherited from class Dataset
edFileType, toString
-
Field Details
-
lineReader
The BufferedReader used. -
rest
Utility variable -
sysinRest
Utility variable
-
-
Constructor Details
-
Infile
-
-
Method Details
-
clfile
-
inimage
Procedure inimage.
Reads a line from the underlying file into a character area
A record is read from the current position of the data set into the image. If the number of characters in the record exceeds the image length, the action taken is system dependent:
-
If the system permits partial record read, image.length characters are read, filled := image.length, and status 34 is returned. In this case the next inimage (on this data set) should continue reading from the next position in the partially read record.
-
If partial record reading is not possible, status error 12 is set and filled is set to zero; the remainder of the record is in this case skipped.
Except for the case of partial record reading the data set will be positioned at the sequentially next record.
Inimage is legal on infiles and directfiles only.
This routine may change the value of the global variable status to one of the values given in app. C. If the status returned is non-zero, filled must be zero, except for the partial read case discussed above (status 12).
-
-
readLine
Utility: read a line- Returns:
- the line string read
- Throws:
IOException- if IOException occurTimeoutException- if Timeout occur
-
IO_read
Utility: read a character with timeout- Parameters:
timeout- the timeout durationunit- the TimeUnit- Returns:
- the line string read
- Throws:
IOException- if IOException occurTimeoutException- if Timeout occur
-
sysinInimage
Reads a line from the underlying file into a character area- Parameters:
chrAddr- the start of the areanchr- the length of the area- Returns:
- the number of characters filled
-