Package edu.rit.pj.cluster
Class FrontendFileReader
java.lang.Object
edu.rit.pj.cluster.FrontendFileReader
Class FrontendFileReader provides an object that reads sequential files in
the job frontend process.
- Version:
- 05-Nov-2006
- Author:
- Alan Kaminsky
-
Constructor Summary
ConstructorDescriptionFrontendFileReader
(JobFrontend theJobFrontend) Construct a new frontend file reader. -
Method Summary
Modifier and TypeMethodDescriptionvoid
inputFileClose
(JobBackendRef theJobBackend, int ffd) Close the given input file.void
inputFileOpen
(JobBackendRef theJobBackend, int bfd, File file) Open the given input file for reading.void
inputFileRead
(JobBackendRef theJobBackend, int ffd, int len) Read bytes from the given input file.void
inputFileSkip
(JobBackendRef theJobBackend, int ffd, long len) Skip bytes from the given input file.
-
Constructor Details
-
FrontendFileReader
Construct a new frontend file reader.- Parameters:
theJobFrontend
- Job Frontend.
-
-
Method Details
-
inputFileOpen
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
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
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
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.
-