public class IFSTextFileOutputStream extends IFSFileOutputStream implements java.io.Serializable
IFSFileWriter
.
The following example illustrates the use of IFSTextFileOutputStream:
// Work with /File on the system eniac. AS400 as400 = new AS400("eniac"); IFSTextFileOutputStream file = new IFSTextFileOutputStream(as400, "/File");
// Write a String to the file (don't convert characters). file.write("Hello world"); // Close the file. file.close();
changes_, fd_, SHARE_ALL, SHARE_NONE, SHARE_READERS, SHARE_WRITERS, vetos_
Constructor and Description |
---|
IFSTextFileOutputStream()
Constructs an IFSTextFileOutputStream object.
|
IFSTextFileOutputStream(AS400 system,
IFSFile file,
int shareOption,
boolean append)
Constructs an IFSTextFileOutputStream object.
|
IFSTextFileOutputStream(AS400 system,
IFSFile file,
int shareOption,
boolean append,
int ccsid)
Constructs an IFSTextFileOutputStream object.
|
IFSTextFileOutputStream(AS400 system,
IFSJavaFile file,
int shareOption,
boolean append)
Constructs an IFSTextFileOutputStream object.
|
IFSTextFileOutputStream(AS400 system,
IFSJavaFile file,
int shareOption,
boolean append,
int ccsid)
Constructs an IFSTextFileOutputStream object.
|
IFSTextFileOutputStream(AS400 system,
java.lang.String name)
Constructs an IFSTextFileOutputStream object.
|
IFSTextFileOutputStream(AS400 system,
java.lang.String name,
int ccsid)
Constructs an IFSTextFileOutputStream object.
|
IFSTextFileOutputStream(AS400 system,
java.lang.String name,
int shareOption,
boolean append)
Constructs an IFSTextFileOutputStream object.
|
IFSTextFileOutputStream(AS400 system,
java.lang.String name,
int shareOption,
boolean append,
int ccsid)
Constructs an IFSTextFileOutputStream object.
|
IFSTextFileOutputStream(IFSFile file)
Constructs an IFSTextFileOutputStream object.
|
IFSTextFileOutputStream(IFSFileDescriptor fd)
Constructs an IFSTextFileOutputStream object.
|
IFSTextFileOutputStream(IFSJavaFile file)
Constructs an IFSTextFileOutputStream object.
|
Modifier and Type | Method and Description |
---|---|
int |
getCCSID()
Returns the CCSID.
|
void |
setCCSID(int ccsid)
Sets the CCSID for the data written to the file.
|
void |
write(java.lang.String data)
Writes characters to this text file input stream.
|
addFileListener, addPropertyChangeListener, addVetoableChangeListener, close, finalize, flush, getFD, getPath, getShareOption, getSystem, lock, lock, open, removeFileListener, removePropertyChangeListener, removeVetoableChangeListener, setAppend, setFD, setPath, setShareOption, setSystem, unlock, write, write, write
public IFSTextFileOutputStream()
public IFSTextFileOutputStream(AS400 system, java.lang.String name) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.name
- The file to be opened for writing.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileOutputStream(AS400 system, java.lang.String name, int ccsid) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.name
- The file to be opened for writing.ccsid
- The CCSID of the data being written to the file.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileOutputStream(AS400 system, java.lang.String name, int shareOption, boolean append) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.name
- The file to be opened for writing.shareOption
- Indicates how other user's can access the file. append
- Controls the behavior when the file exists. If true, output
is appended to the file;
otherwise, the current contents of the file are erased,
and output replaces the file contents.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileOutputStream(AS400 system, java.lang.String name, int shareOption, boolean append, int ccsid) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.name
- The file to be opened for writing.shareOption
- Indicates how other user's can access the file. append
- Controls the behavior when the file exists. If true, output
is appended to the file;
otherwise, the current contents of the file are erased,
and output replaces the file contents.ccsid
- The CCSID of the data being written to the file.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileOutputStream(IFSFile file) throws AS400SecurityException, java.io.IOException
file
- The file to be opened for writing.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileOutputStream(AS400 system, IFSFile file, int shareOption, boolean append) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.file
- The file to be opened for writing.shareOption
- Indicates how other user's can access the file. append
- Controls the behavior when the file exists. If true, output
is appended to the file;
otherwise, the current contents of the file are erased,
and output replaces the file contents.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileOutputStream(AS400 system, IFSFile file, int shareOption, boolean append, int ccsid) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.file
- The file to be opened for writing.shareOption
- Indicates how other user's can access the file. append
- Controls the behavior when the file exists. If true, output
is appended to the file;
otherwise, the current contents of the file are erased,
and output replaces the file contents.ccsid
- The CCSID of the data being written to the file.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileOutputStream(IFSJavaFile file) throws AS400SecurityException, java.io.IOException
file
- The file to be opened for writing.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileOutputStream(AS400 system, IFSJavaFile file, int shareOption, boolean append) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.file
- The file to be opened for writing.shareOption
- Indicates how other user's can access the file. append
- Controls the behavior when the file exists. If true, output
is appended to the file;
otherwise, the current contents of the file are erased,
and output replaces the file contents.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileOutputStream(AS400 system, IFSJavaFile file, int shareOption, boolean append, int ccsid) throws AS400SecurityException, java.io.IOException
system
- The AS400 that contains the file.file
- The file to be opened for writing.shareOption
- Indicates how other user's can access the file. append
- Controls the behavior when the file exists. If true, output
is appended to the file;
otherwise, the current contents of the file are erased,
and output replaces the file contents.ccsid
- The CCSID of the data being written to the file.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.public IFSTextFileOutputStream(IFSFileDescriptor fd)
fd
- The file descriptor to be opened for writing.public int getCCSID()
IFSFile.getCCSID()
public void setCCSID(int ccsid) throws java.beans.PropertyVetoException
ccsid
- The target CCSID.java.beans.PropertyVetoException
- If the change is vetoed.public void write(java.lang.String data) throws java.io.IOException
data
- The characters to write to the stream.java.io.IOException
- If an error occurs while communicating with the system.getCCSID()
,
setCCSID(int)