Use this class for reading character files in the integrated file system.
IFSFileReader is meant for reading streams of characters. IFSFileReader replaces IFSTextFileOutputStream.
import java.io.BufferedReader; // Work with /File1 on the system eniac. AS400 system = new AS400("eniac"); IFSFile file = new IFSFile(system, "/File1"); BufferedReader reader = new BufferedReader(new IFSFileReader(file)); // Read the first line of the file, converting characters. String line1 = reader.readLine(); // Display the String that was read. System.out.println(line1); // Close the reader. reader.close();