Class Directfile


public class Directfile extends ImageFile

Directfile Bridge.

Link to GitHub: Source File.

Author:
Simula Standard, S-Port: The Environment Interface, Øystein Myhre Andersen
  • Field Details

    • randomAccessFile

      private RandomAccessFile randomAccessFile
      The underlying RandomAccessFile used.
    • RECORDSIZE

      int RECORDSIZE
      The variable "RECORDSIZE" is the fixed size of all external images. It is set by "open" and subdivide the external file into series of external images, without any image separating characters.
    • MAXLOC

      public int MAXLOC
      The variable MAXLOC indicates the maximum possible location on the external file. If this is not meaningful MAXLOC has the value of "maxint"-1. The procedure "maxloc" gives access to the current MAXLOC value.
  • Constructor Details

    • Directfile

      public Directfile(String fileName, int type, String action, int imglng)
      Construct a new DirectfileSpec with the given arguments.
      Parameters:
      fileName - the fileName
      type - the fileType
      action - the action string
      imglng - the image length
  • Method Details

    • clfile

      public void clfile()
      Description copied from class: Dataset
      Close the underlying file
      Overrides:
      clfile in class Dataset
    • inimage

      public int inimage(ObjectAddress chrAddr, int nchr)
      Description copied from class: ImageFile
      Reads a line from the underlying file into a character area
      Overrides:
      inimage in class ImageFile
      Parameters:
      chrAddr - the start of the area
      nchr - the length of the area
      Returns:
      the number of characters filled
    • readLine

      private String readLine()
      Utility: read a line from the underlying RandomAccessFile
      Returns:
      the line read
    • outimage

      public void outimage(String image)
      Description copied from class: ImageFile
      Writes outimage to the underlying file
      Overrides:
      outimage in class ImageFile
      Parameters:
      image - the image string to be written
    • locate

      public void locate(int pos)
      Locate the given 'pos' on the underlying RandomAccessFile
      Parameters:
      pos - the position to locate
    • lastloc

      public int lastloc()
      Returns the last location
      Returns:
      the last location