|
|||||||||
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.SpooledFileOutputStream
The SpooledFileOutputStream class is used to write data into an AS/400 spooled file.
Constructor Summary | |
SpooledFileOutputStream(AS400 system,
PrintParameterList options,
PrinterFile printerFile,
OutputQueue outputQueue)
Constructs a SpooledFileOutputStream object. |
Method Summary | |
void |
close()
Closes the stream. |
void |
flush()
Flushes the stream. |
SpooledFile |
getSpooledFile()
Returns the spooled file that was created (or is being created) with this output stream. |
void |
write(byte[] data)
Writes data.length bytes of data from the byte array data to the spooled file. |
void |
write(byte[] data,
int offset,
int length)
Writes up to length bytes of data from the byte array data, starting at offset, to this spooled file. |
void |
write(int b)
Writes a byte of data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SpooledFileOutputStream(AS400 system, PrintParameterList options, PrinterFile printerFile, OutputQueue outputQueue) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException
system
- The system on which to create the spooled file.options
- Optional. A print parameter list that contains
a list of attributes with which to create the spooled file.
The attributes set in options will
override those attributes in the printer file that is used.
The printer file used will be the one specified with the
printerFile parameter, or if that parameter is null,
it will be the default network print server printer file (QPNPSPRTF).
If the output queue is specified in options, it
will override any output queue passed in the outputQueue
parameter.
The following parameters may be set:
printerFile
- Optional. The printer file that should be used
to create the spooled file. This printer file
must reside on the same AS400 system that the
spooled file is being created.outputQueue
- Optional. The output queue on which to create the
spooled file. The output queue must reside on
the same AS400 system that the spooled file
is being created.AS400Exception
- If the AS/400 system returns an error message.AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.io.IOException
- If an error occurs while communicating with the AS/400.java.lang.InterruptedException
- If this thread is interrupted.Method Detail |
public void close() throws java.io.IOException
close
in class java.io.OutputStream
java.io.IOException
- If an error occurs while communicating with the AS/400.public void flush() throws java.io.IOException
flush
in class java.io.OutputStream
java.io.IOException
- If an error occurs while communicating with the AS/400.public SpooledFile getSpooledFile() throws java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
b
- The byte to be written.java.io.IOException
- If an error occurs while communicating with the AS/400.public void write(byte[] data) throws java.io.IOException
write
in class java.io.OutputStream
data
- The data to be written.java.io.IOException
- If an error occurs while communicating with the AS/400.public void write(byte[] data, int offset, int length) throws java.io.IOException
write
in class java.io.OutputStream
data
- The data to be written.offset
- The start offset in the data.length
- The number of bytes that are written.java.io.IOException
- If an error occurs while communicating with the AS/400.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |