public class IFSTextFileInputStream extends IFSFileInputStream implements java.io.Serializable
IFSFileReader
.
The following example illustrates the use of IFSTextFileInputStream:
// Work with /File on the system eniac. AS400 as400 = new AS400("eniac"); IFSTextFileInputStream file = new IFSTextFileInputStream(as400, "/File");
// Read the first four characters of the file. String s = file.read(4); // Display the characters read. System.out.println(s); // Close the file. file.close();
fd_, SHARE_ALL, SHARE_NONE, SHARE_READERS, SHARE_WRITERS
Constructor and Description |
---|
IFSTextFileInputStream()
Constructs an IFSTextFileInputStream object.
|
IFSTextFileInputStream(AS400 system,
IFSFile file,
int shareOption)
Constructs an IFSTextFileInputStream object.
|
IFSTextFileInputStream(AS400 system,
IFSJavaFile file,
int shareOption)
Constructs an IFSTextFileInputStream object.
|
IFSTextFileInputStream(AS400 system,
java.lang.String name)
Constructs an IFSTextFileInputStream object.
|
IFSTextFileInputStream(AS400 system,
java.lang.String name,
int shareOption)
Constructs an IFSTextFileInputStream object.
|
IFSTextFileInputStream(IFSFile file)
Constructs an IFSTextFileInputStream object.
|
IFSTextFileInputStream(IFSFileDescriptor fd)
Constructs an IFSTextFileInputStream object.
|
IFSTextFileInputStream(IFSJavaFile file)
Constructs an IFSTextFileInputStream object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
read(int length)
Reads up to length characters from this text file input stream.
|
addFileListener, addPropertyChangeListener, addVetoableChangeListener, available, close, finalize, getFD, getPath, getShareOption, getSystem, lock, lock, open, read, read, read, removeFileListener, removePropertyChangeListener, removeVetoableChangeListener, reset, rewind, setFD, setPath, setShareOption, setSystem, skip, unlock
public IFSTextFileInputStream()
public IFSTextFileInputStream(AS400 system, java.lang.String name) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.name
- The integrated file system name.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileInputStream(AS400 system, java.lang.String name, int shareOption) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.name
- The integrated file system name.shareOption
- Indicates how users can access the file. AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileInputStream(IFSFile file) throws AS400SecurityException, java.io.IOException
file
- The file to be opened for reading.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileInputStream(AS400 system, IFSFile file, int shareOption) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.file
- The file to be opened for reading.shareOption
- Indicates how users can access the file. AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileInputStream(IFSJavaFile file) throws AS400SecurityException, java.io.IOException
file
- The file to be opened for reading.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileInputStream(AS400 system, IFSJavaFile file, int shareOption) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.file
- The file to be opened for reading.shareOption
- Indicates how users can access the file. AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileInputStream(IFSFileDescriptor fd)
fd
- The file descriptor to be opened for reading.public java.lang.String read(int length) throws java.io.IOException
length
- The number of characters to read from the stream.java.io.IOException
- If an error occurs while communicating with the system.