|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--com.ibm.as400.access.IFSFileOutputStream | +--com.ibm.as400.access.IFSTextFileOutputStream
The IFSTextFileOutputStream class represents an integrated file system output stream for character data.
IFSTextFileOutputStream object is capable of generating file events which call the following FileListener methods: fileClosed, fileModified, and fileOpened.
Note: By default, Unicode data is written to the file. To use another CCSID when writing to the file, use one of the constructors that has a ccsid parameter.
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();
FileEvent
,
IFSFileOutputStream.addFileListener(com.ibm.as400.access.FileListener)
,
IFSFileOutputStream.removeFileListener(com.ibm.as400.access.FileListener)
, Serialized FormFields inherited from class com.ibm.as400.access.IFSFileOutputStream |
changes_,
fd_,
SHARE_ALL,
SHARE_NONE,
SHARE_READERS,
SHARE_WRITERS,
vetos_ |
Constructor Summary | |
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. |
Method Summary | |
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. |
Methods inherited from class com.ibm.as400.access.IFSFileOutputStream |
addFileListener,
addPropertyChangeListener,
addVetoableChangeListener,
close,
finalize,
flush,
getFD,
getPath,
getShareOption,
getSystem,
lock,
open,
removeFileListener,
removePropertyChangeListener,
removeVetoableChangeListener,
setAppend,
setFD,
setPath,
setShareOption,
setSystem,
unlock,
write,
write,
write |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
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.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.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.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.public IFSTextFileOutputStream(IFSFile file) throws AS400SecurityException, java.io.IOException
file
- The file to be opened for writing.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.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.public IFSTextFileOutputStream(IFSJavaFile file) throws AS400SecurityException, java.io.IOException
file
- The file to be opened for writing.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.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.public IFSTextFileOutputStream(IFSFileDescriptor fd)
fd
- The file descriptor to be opened for writing.Method Detail |
public int getCCSID()
IFSFile.getCCSID()
public void setCCSID(int ccsid) throws java.beans.PropertyVetoException
ccsid
- The target CCSID.public void write(java.lang.String data) throws java.io.IOException
data
- The characters to write to the stream.getCCSID()
,
setCCSID(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |