|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.access.PrintObject | +--com.ibm.as400.access.SpooledFile
The SpooledFile class represents an AS/400 spooled file. You can use an instance of this class to manipulate an individual AS/400 spooled file (hold, release, delete, send, read, and so on). To create new spooled files on the AS/400, use the SpooledFileOutputStream class. See Spooled File Attributes for valid attributes.
PrintObjectInputStream
,
PrintObjectPageInputStream
,
PrintObjectTransformedInputStream
, Serialized FormConstructor Summary | |
SpooledFile(AS400 system,
java.lang.String name,
int number,
java.lang.String jobName,
java.lang.String jobUser,
java.lang.String jobNumber)
Constructs a SpooledFile object. |
|
SpooledFile(AS400 system,
java.lang.String name,
int number,
java.lang.String jobName,
java.lang.String jobUser,
java.lang.String jobNumber,
java.lang.String jobSysName,
java.lang.String createDate,
java.lang.String createTime)
Constructs a SpooledFile object. |
Method Summary | |
void |
answerMessage(java.lang.String reply)
Replies to the message that caused the spooled file to wait. |
void |
delete()
Deletes the spooled file on the AS/400. |
java.lang.String |
getCreateDate()
Returns the date of the spooled file creation. |
java.lang.String |
getCreateTime()
Returns the time of spooled file creation. |
PrintObjectInputStream |
getInputStream()
Returns an input stream that can be used to read the contents of the spooled file. |
java.lang.String |
getJobName()
Returns the name of the job that created the spooled file. |
java.lang.String |
getJobNumber()
Returns the number of the job that created the spooled file. |
java.lang.String |
getJobSysName()
Returns the name of the system where the spooled file was created. |
java.lang.String |
getJobUser()
Returns the ID of the user that created the spooled file. |
AS400Message |
getMessage()
Returns the message that is associated with this spooled file. |
java.lang.String |
getName()
Returns the name of the spooled file. |
int |
getNumber()
Returns the number of the spooled file. |
PrintObjectPageInputStream |
getPageInputStream(PrintParameterList pageStreamOptions)
Returns a page input stream that can be used to read the contents of the spooled file, one page at a time. |
PrintObjectTransformedInputStream |
getTransformedInputStream(PrintParameterList transformOptions)
Returns a transformed input stream that can be used to read the contents of the spooled file. |
void |
hold(java.lang.String holdType)
Holds the spooled file. |
void |
move(OutputQueue targetOutputQueue)
Moves the spooled file to another output queue. |
void |
move(SpooledFile targetSpooledFile)
Moves the spooled file to another output queue or to another position on the same output queue. |
void |
moveToTop()
Moves the spooled file to the first position on the output queue. |
void |
release()
Releases a held spooled file on the AS/400. |
void |
sendNet(PrintParameterList sendOptions)
Sends the spooled file to another user on the same system or to a remote system on the network. |
void |
sendTCP(PrintParameterList sendOptions)
Sends a spooled file to be printed on a remote system. |
void |
setAttributes(PrintParameterList attributes)
Sets one or more attributes of the object. |
Methods inherited from class com.ibm.as400.access.PrintObject |
addPropertyChangeListener, addVetoableChangeListener, getFloatAttribute, getIntegerAttribute, getStringAttribute, getSystem, removePropertyChangeListener, removeVetoableChangeListener, setSystem, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SpooledFile(AS400 system, java.lang.String name, int number, java.lang.String jobName, java.lang.String jobUser, java.lang.String jobNumber)
system
- The system on which this spooled file exists.name
- The name of the spooled file.number
- The number of the spooled file.jobName
- The name of the job that created the spooled file.jobUser
- The user who created the spooled file.jobNumber
- The number of the job that created the spooled file.public SpooledFile(AS400 system, java.lang.String name, int number, java.lang.String jobName, java.lang.String jobUser, java.lang.String jobNumber, java.lang.String jobSysName, java.lang.String createDate, java.lang.String createTime)
system
- The system on which this spooled file exists.name
- The name of the spooled file.number
- The number of the spooled file.jobName
- The name of the job that created the spooled file.jobUser
- The user who created the spooled file.jobNumber
- The number of the job that created the spooled file.jobSysName
- The name of the system where the spooled file was created.createDate
- The date the spooled file was created on the system.createTime
- The time the spooled file was created on the system.Method Detail |
public void answerMessage(java.lang.String reply) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
reply
- The string that contains the reply for the message.
The default reply can be obtained by calling
the getMessage() method, and then calling the
getDefaultReply() method on the message object that is returned.
Other possible replies are given in the message help,
which can also be retrieved from the message object returned
on the getMessage() method.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.RequestNotSupportedException
- If the requested function is not supported because the
AS/400 system is not at the correct level.public void delete() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException
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.public PrintObjectInputStream getInputStream() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
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.RequestNotSupportedException
- If the requested function is not supported
because the AS/400 system is not at the
correct level.public java.lang.String getJobName()
public java.lang.String getJobNumber()
public java.lang.String getJobUser()
public java.lang.String getJobSysName()
public java.lang.String getCreateDate()
public java.lang.String getCreateTime()
public AS400Message getMessage() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException
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.public java.lang.String getName()
public int getNumber()
public PrintObjectPageInputStream getPageInputStream(PrintParameterList pageStreamOptions) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
pageStreamOptions
- A print parameter list that contains
parameters for generating the page input stream. 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,
or the spooled file format is not supported.java.io.IOException
- If an error occurs while communicating with the AS/400.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported
because the AS/400 system is not at the
correct level.public PrintObjectTransformedInputStream getTransformedInputStream(PrintParameterList transformOptions) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
transformOptions
- A print parameter list that contains
parameters for generating the transformed input stream. 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,
or the spooled file format is not supported.java.io.IOException
- If an error occurs while communicating with the AS/400.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported
because the AS/400 system is not at the
correct level.public void hold(java.lang.String holdType) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
holdType
- When to hold the spooled file.
May be any of the following values:
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.RequestNotSupportedException
- If the requested function is not supported because the
AS/400 system is not at the correct level.public void move(SpooledFile targetSpooledFile) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
targetSpooledFile
- The spooled file to move this
spooled file after. The targetSpooledFile and this spooled file
must reside on the same AS/400.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.RequestNotSupportedException
- If the requested function is not supported because the
AS/400 system is not at the correct level.public void move(OutputQueue targetOutputQueue) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
targetOutputQueue
- The output queue to move the
spooled file to. The spooled file will be moved to the first
position on this output queue. The output queue and this spooled
file must reside on the same AS/400.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.RequestNotSupportedException
- If the requested function is not supported because the
AS/400 system is not at the correct level.public void moveToTop() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
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.RequestNotSupportedException
- If the requested function is not supported because the
AS/400 system is not at the correct level.public void release() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
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.RequestNotSupportedException
- If the requested function is not supported because the
AS/400 system is not at the correct level.public void sendNet(PrintParameterList sendOptions) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException
sendOptions
- A print parameter list that contains the
parameters for the send. The following attributes MUST be set:
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.public void sendTCP(PrintParameterList sendOptions) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException
sendOptions
- A print parameter list that contains the
parameters for the send. The following attributes MUST be set:
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.public void setAttributes(PrintParameterList attributes) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
attributes
- A print parameter list that contains the
attributes to be changed.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/400java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the
AS/400 system is not at the correct level.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |