Class FrontendFileReader

java.lang.Object
edu.rit.pj.cluster.FrontendFileReader

public class FrontendFileReader extends Object
Class FrontendFileReader provides an object that reads sequential files in the job frontend process.
Version:
05-Nov-2006
Author:
Alan Kaminsky
  • Constructor Details

    • FrontendFileReader

      public FrontendFileReader(JobFrontend theJobFrontend)
      Construct a new frontend file reader.
      Parameters:
      theJobFrontend - Job Frontend.
  • Method Details

    • inputFileOpen

      public void inputFileOpen(JobBackendRef theJobBackend, int bfd, File file) throws IOException
      Open the given input file for reading.
      Parameters:
      theJobBackend - Job Backend that is calling this method.
      bfd - Backend file descriptor.
      file - File.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • inputFileRead

      public void inputFileRead(JobBackendRef theJobBackend, int ffd, int len) throws IOException
      Read bytes from the given input file. ffd = 1 refers to the job's standard input stream; other values refer to a previously opened file.
      Parameters:
      theJobBackend - Job Backend that is calling this method.
      ffd - Frontend file descriptor.
      len - Number of bytes to read.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • inputFileSkip

      public void inputFileSkip(JobBackendRef theJobBackend, int ffd, long len) throws IOException
      Skip bytes from the given input file.
      Parameters:
      theJobBackend - Job Backend that is calling this method.
      ffd - Frontend file descriptor.
      len - Number of bytes to skip.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.
    • inputFileClose

      public void inputFileClose(JobBackendRef theJobBackend, int ffd) throws IOException
      Close the given input file.
      Parameters:
      theJobBackend - Job Backend that is calling this method.
      ffd - Frontend file descriptor.
      Throws:
      IOException - Thrown if an I/O error occurred.
      IOException - if any.