IFSTextFileInputStream has been deprecated and replaced by class IFSFileReader.
The IFSTextFileInputStream class represents a stream of character data read from a file. The data read from the IFSTextFileInputStream object is supplied to the Java™ program in a Java String object, so it is always Unicode. When the file is opened, the IFSTextFileInputStream object determines the CCSID of the data in the file. If the data is stored in an encoding other than Unicode, the IFSTextFileInputStream object converts the data from the file's encoding to Unicode before giving the data to the Java program. If the data cannot be converted, an UnsupportedEncodingException is thrown.
The following example shows how to use the IFSTextFileInputStream:
// Work with /File on the system // mySystem. AS400 as400 = new AS400("mySystem"); IFSTextFileInputStream file = new IFSTextFileInputStream(as400, "/File"); // Read the first four characters of // the file. String s = file.read(4); // Display the characters read. Read // the first four characters of the // file. If necessary, the data is // converted to Unicode by the // IFSTextFileInputStream object. System.out.println(s); // Close the file. file.close();