Class DirectBytefile


public class DirectBytefile extends ByteFile

DirectBytefile 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.
    • 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

    • DirectBytefile

      public DirectBytefile(String fileName, int type, String action)
      Construct a new DirectBytefileSpec with the given arguments.
      Parameters:
      fileName - the fileName
      type - the fileType
      action - the action string
  • Method Details

    • clfile

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

      public int inbyte()
      Returns a byte from the underlying RandomAccessFile
      Returns:
      a byte from the underlying RandomAccessFile
    • outbyte

      public void outbyte(int b)
      Writes a byte through the underlying RandomAccessFile
      Parameters:
      b - the byte 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