com.ibm.as400.access
Class SpooledFile
- java.lang.Object
-
- com.ibm.as400.access.PrintObject
-
- com.ibm.as400.access.SpooledFile
-
- All Implemented Interfaces:
- java.io.Serializable
public class SpooledFile extends PrintObject implements java.io.Serializable
Represents a spooled file. You can use an instance of this class to manipulate an individual spooled file (hold, release, delete, send, read, and so on). To create new spooled files on the system, use theSpooledFileOutputStream
class. See Spooled File Attributes for valid attributes.
-
-
Field Summary
-
Fields inherited from class com.ibm.as400.access.PrintObject
ATTR_3812SCS, ATTR_ACCOUNT_CODE, ATTR_AFP, ATTR_AFP_RESOURCE, ATTR_AFPRESOURCE, ATTR_ALIGN, ATTR_ALIGNFORMS, ATTR_ALWDRTPRT, ATTR_ASCIITRANS, ATTR_ASPDEVICE, ATTR_AUTHCHCK, ATTR_AUTHORITY, ATTR_AUTOEND, ATTR_AUX_POOL, ATTR_BACK_OVERLAY, ATTR_BARCODE, ATTR_BKMGN_ACR, ATTR_BKMGN_DWN, ATTR_BKOVL_ACR, ATTR_BKOVL_DWN, ATTR_BTWNCPYSTS, ATTR_BTWNFILESTS, ATTR_CHANGES, ATTR_CHAR_ID, ATTR_CHARID, ATTR_CHR_RTT_CMDS, ATTR_CHRSET, ATTR_CHRSET_LIB, ATTR_CHRSET_SIZE, ATTR_CODEDFNT, ATTR_CODEDFNTLIB, ATTR_CODEDFONT_SIZE, ATTR_CODEPAGE, ATTR_CODEPAGE_NAME, ATTR_CODEPAGE_NAME_LIB, ATTR_CODFNT_ARRAY, ATTR_COLOR, ATTR_CONSTBCK_OVL, ATTR_CONTROLCHAR, ATTR_CONVERT_LINEDATA, ATTR_COPIES, ATTR_COPIESLEFT, ATTR_CORNER_STAPLE, ATTR_CPI, ATTR_CPI_CHANGES, ATTR_CURPAGE, ATTR_DATA_QUEUE, ATTR_DATAFORMAT, ATTR_DATE, ATTR_DATE_END, ATTR_DATE_USED, ATTR_DATE_WTR_BEGAN_FILE, ATTR_DATE_WTR_CMPL_FILE, ATTR_DAYS_UNTIL_EXPIRE, ATTR_DBCS_FNT, ATTR_DBCS_FNT_LIB, ATTR_DBCS_FNT_SIZE, ATTR_DBCSCPI, ATTR_DBCSDATA, ATTR_DBCSEXTENSN, ATTR_DBCSROTATE, ATTR_DBCSSISO, ATTR_DDS, ATTR_DECIMAL_FMT, ATTR_DELETESPLF, ATTR_DESCRIPTION, ATTR_DESTINATION, ATTR_DESTOPTION, ATTR_DEVCLASS, ATTR_DEVMODEL, ATTR_DEVSTATUS, ATTR_DEVTYPE, ATTR_DFR_WRITE, ATTR_DISPLAYANY, ATTR_DOUBLEWIDE, ATTR_DRAWERCHANGE, ATTR_DRWRSEP, ATTR_DUPLEX, ATTR_EDGESTITCH_NUMSTAPLES, ATTR_EDGESTITCH_REF, ATTR_EDGESTITCH_REFOFF, ATTR_ENDPAGE, ATTR_ENDPNDSTS, ATTR_ENVLP_SOURCE, ATTR_EXPIRATION_DATE, ATTR_FIDELITY, ATTR_FIELD_OUTLIN, ATTR_FILESEP, ATTR_FOLDREC, ATTR_FONT_CHANGES, ATTR_FONTID, ATTR_FONTRESFMT, ATTR_FORM_DEFINITION, ATTR_FORMFEED, ATTR_FORMTYPE, ATTR_FORMTYPEMSG, ATTR_FRONT_OVERLAY, ATTR_FTMGN_ACR, ATTR_FTMGN_DWN, ATTR_FTOVL_ACR, ATTR_FTOVL_DWN, ATTR_GRAPHICS, ATTR_GRAPHICS_TOK, ATTR_GRPLVL_IDXTAG, ATTR_HELDSTS, ATTR_HIGHLIGHT, ATTR_HOLD, ATTR_HOLDPNDSTS, ATTR_HOLDTYPE, ATTR_IMGCFG, ATTR_INTERNETADDR, ATTR_IPDSPASSTHRU, ATTR_IPP_ATTR_CCSID, ATTR_IPP_ATTR_NL, ATTR_IPP_JOB_ID, ATTR_IPP_JOB_NAME, ATTR_IPP_JOB_NAME_NL, ATTR_IPP_JOB_ORIGUSER, ATTR_IPP_JOB_ORIGUSER_NL, ATTR_IPP_PRINTER_NAME, ATTR_JOBCCSID, ATTR_JOBNAME, ATTR_JOBNUMBER, ATTR_JOBSEPRATR, ATTR_JOBSYSTEM, ATTR_JOBUSER, ATTR_JUSTIFY, ATTR_LASTPAGE, ATTR_LIBRARY, ATTR_LINESPACING, ATTR_LPI, ATTR_LPI_CHANGES, ATTR_MAX_JOBS_PER_CLIENT, ATTR_MAXRCDS, ATTR_MEASMETHOD, ATTR_MESSAGE_QUEUE, ATTR_MFGTYPE, ATTR_MSGHELP, ATTR_MSGID, ATTR_MSGREPLY, ATTR_MSGSEV, ATTR_MSGTEXT, ATTR_MSGTYPE, ATTR_MULTI_ITEM_REPLY, ATTR_MULTIUP, ATTR_NETWORK, ATTR_NPSCCSID, ATTR_NPSLEVEL, ATTR_NUMBYTES, ATTR_NUMBYTES_SPLF, ATTR_NUMFILES, ATTR_NUMRSC_LIB_ENT, ATTR_NUMWRITERS, ATTR_OBJEXTATTR, ATTR_OFFICEVISION, ATTR_ONJOBQSTS, ATTR_OPCNTRL, ATTR_OPENCMDS, ATTR_ORDER, ATTR_OS4_CRT_AFP, ATTR_OUTPTY, ATTR_OUTPUT_QUEUE, ATTR_OUTPUTBIN, ATTR_OUTQSTS, ATTR_OVERALLSTS, ATTR_OVERFLOW, ATTR_PAGE_AT_A_TIME, ATTR_PAGE_DEFINITION, ATTR_PAGE_GROUPS, ATTR_PAGE_ROTATE, ATTR_PAGELEN, ATTR_PAGELVLIDXTAG, ATTR_PAGENUMBER, ATTR_PAGES, ATTR_PAGES_EST, ATTR_PAGEWIDTH, ATTR_PAGRTT, ATTR_PAPER_SOURCE_1, ATTR_PAPER_SOURCE_2, ATTR_PELDENSITY, ATTR_PGM_OPN_FILE, ATTR_PGM_OPN_LIB, ATTR_POINTSIZE, ATTR_PRINTER, ATTR_PRINTER_FILE, ATTR_PRTASSIGNED, ATTR_PRTDEVTYPE, ATTR_PRTQUALITY, ATTR_PRTSEQUENCE, ATTR_PRTTEXT, ATTR_PUBINF, ATTR_PUBINF_COLOR_SUP, ATTR_PUBINF_DS, ATTR_PUBINF_DUPLEX_SUP, ATTR_PUBINF_LOCATION, ATTR_PUBINF_PPM, ATTR_PUBINF_PPM_COLOR, ATTR_RCDFMT_DATA, ATTR_RECLENGTH, ATTR_REDUCE, ATTR_RESTART, ATTR_RMTLOCNAME, ATTR_RMTPRTQ, ATTR_RMTSYSTEM, ATTR_RPLCHAR, ATTR_RPLUNPRT, ATTR_RSC_LIB_LIST, ATTR_SADDLESTITCH_NUMSTAPLES, ATTR_SADDLESTITCH_REF, ATTR_SADDLESTITCH_STPL_OFFSEINFO, ATTR_SAVE, ATTR_SAVE_COMMAND, ATTR_SAVE_DEVICE, ATTR_SAVE_FILE, ATTR_SAVE_LABEL, ATTR_SAVE_SEQUENCE_NUMBER, ATTR_SAVE_VOLUME_FORMAT, ATTR_SAVE_VOLUME_ID, ATTR_SCHEDULE, ATTR_SCS2ASCII, ATTR_SEEKOFF, ATTR_SEEKORG, ATTR_SENDPTY, ATTR_SEPPAGE, ATTR_SPLF_AUTH_METHOD, ATTR_SPLF_CREATOR, ATTR_SPLF_RESTORED_DATE, ATTR_SPLF_RESTORED_TIME, ATTR_SPLF_SAVED_DATE, ATTR_SPLF_SAVED_TIME, ATTR_SPLF_SECURITY_METHOD, ATTR_SPLF_SIZE, ATTR_SPLF_SIZE_MULT, ATTR_SPLFNUM, ATTR_SPLFSTATUS, ATTR_SPLSCS, ATTR_SPOOL, ATTR_SPOOLFILE, ATTR_SRC_CODEPAGE, ATTR_SRCDRWR, ATTR_STARTEDBY, ATTR_STARTPAGE, ATTR_SYS_DRV_PGM, ATTR_SYSTEM, ATTR_TGT_CODEPAGE, ATTR_TIME, ATTR_TIME_END, ATTR_TIME_WTR_BEGAN_FILE, ATTR_TIME_WTR_CMPL_FILE, ATTR_TOADDRESS, ATTR_TOUSERID, ATTR_TRC1403, ATTR_UNITOFMEAS, ATTR_USER_DEFINED_OBJECT, ATTR_USER_DFN_TXT, ATTR_USER_DRIVER_PROG, ATTR_USER_TRANSFORM_PROG, ATTR_USERCMT, ATTR_USERDATA, ATTR_USERGEN_DATA, ATTR_USRDEFDATA, ATTR_USRDEFFILE, ATTR_USRDEFOPT, ATTR_USRDRVDATA, ATTR_VIEWING_FIDELITY, ATTR_VMMVSCLASS, ATTR_WORKSTATION_CUST_OBJECT, ATTR_WRTNGSTS, ATTR_WTNGDATASTS, ATTR_WTNGDEVSTS, ATTR_WTNGMSGSTS, ATTR_WTRAUTOEND, ATTR_WTREND, ATTR_WTRINIT, ATTR_WTRJOBNAME, ATTR_WTRJOBNUM, ATTR_WTRJOBSTS, ATTR_WTRJOBUSER, ATTR_WTRSTRPAGE, ATTR_WTRSTRTD
-
-
Constructor Summary
Constructors Constructor and Description 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
Methods Modifier and Type Method and Description void
answerMessage(java.lang.String reply)
Replies to the message that caused the spooled file to wait.SpooledFile
copy()
Creates a copy of the spooled file this (SpooledFile) object represents.SpooledFile
copy(OutputQueue outputQueue)
Creates a copy of the spooled file this object represents.void
delete()
Deletes the spooled file on the system.PrintObjectInputStream
getAFPInputStream()
Returns an input stream that can be used to read the contents of an AFP spooled file.java.lang.String
getCreateDate()
Returns the date of the spooled file creation.java.lang.String
getCreateTime()
Returns the time of spooled file creation.PrintObjectInputStream
getInputACIFMergedStream(boolean acifB)
Deprecated.Use getAFPInputStream() instead.PrintObjectInputStream
getInputStream()
Returns an input stream that can be used to read the contents of the spooled file.PrintObjectInputStream
getInputStream(PrintParameterList ppl)
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 system.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, getSingleFloatAttribute, getSingleIntegerAttribute, getSingleStringAttribute, getStringAttribute, getSystem, removePropertyChangeListener, removeVetoableChangeListener, setSystem, update
-
-
-
-
Constructor Detail
-
SpooledFile
public 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. It uses the specified system and spooled file attributes that identify it on that system.- Parameters:
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.
-
SpooledFile
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)
Constructs a SpooledFile object. It uses the specified system and spooled file attributes that identify it on that system.- Parameters:
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.
The date is encoded in a character string with the following format, CYYMMDD where:- C is the Century, where 0 indicates years 19xx and 1 indicates years 20xx
- YY is the Year
- MM is the Month
- DD is the Day
createTime
- The time the spooled file was created on the system.
The time is encoded in a character string with the following format, HHMMSS where:- HH - Hour
- MM - Minutes
- SS - Seconds
-
-
Method Detail
-
answerMessage
public void answerMessage(java.lang.String reply) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Replies to the message that caused the spooled file to wait.- Parameters:
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.- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system is not at the correct level.
-
copy
public SpooledFile copy() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Creates a copy of the spooled file this (SpooledFile) object represents. The new spooled file is created on the same output queue and on the same system as the original spooled file. A reference to the new spooled file is returned.- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system is not at the correct level.
-
copy
public SpooledFile copy(OutputQueue outputQueue) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Creates a copy of the spooled file this object represents. The new spooled file is created on the specified output queue. A reference to the new spooled file is returned.- Parameters:
outputQueue
- The output queue location to create the new version of the original spooled file. The spooled file will be created to the first position on this output queue. The output queue and this spooled file must reside on the same system.- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system is not at the correct level.
-
delete
public void delete() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException
Deletes the spooled file on the system.- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.
-
getInputStream
public PrintObjectInputStream getInputStream() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Returns an input stream that can be used to read the contents of the spooled file. This method will fail with an AS400Exception if the spooled file is still being created (ATTR_SPLFSTATUS is *OPEN). Note that the bytes are returned untransformed, that is, as they are stored on the server. To transform the bytes into other forms, usegetPageInputStream
orgetTransformedInputStream
.- Returns:
- The input stream object that can be used to read the contents of this spooled file.
- Throws:
AS400Exception
- If 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system is not at the correct level.- See Also:
getPageInputStream(com.ibm.as400.access.PrintParameterList)
,getTransformedInputStream(com.ibm.as400.access.PrintParameterList)
-
getInputStream
public PrintObjectInputStream getInputStream(PrintParameterList ppl) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Returns an input stream that can be used to read the contents of the spooled file. This method will fail with an AS400Exception if the spooled file is still being created (ATTR_SPLFSTATUS is *OPEN). Note that the bytes are returned untransformed, that is, as they are stored on the server. To transform the bytes into other forms, usegetPageInputStream
orgetTransformedInputStream
.- Returns:
- The input stream object that can be used to read the contents of this spooled file.
- Throws:
AS400Exception
- If 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system is not at the correct level.- See Also:
getPageInputStream(com.ibm.as400.access.PrintParameterList)
,getTransformedInputStream(com.ibm.as400.access.PrintParameterList)
-
getInputACIFMergedStream
public PrintObjectInputStream getInputACIFMergedStream(boolean acifB) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Deprecated. Use getAFPInputStream() instead.- Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
java.io.IOException
java.lang.InterruptedException
RequestNotSupportedException
- See Also:
getAFPInputStream()
-
getAFPInputStream
public PrintObjectInputStream getAFPInputStream() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Returns an input stream that can be used to read the contents of an AFP spooled file. The external resources referenced by the original AFP spooled file will be included in this input stream. If you don't want the external resources included usegetInputStream
orgetPageInputStream
. This method will fail with an AS400Exception if the spooled file is still being created (ATTR_SPLFSTATUS is *OPEN) or if the spooled file doesn't contain AFDS data ie. ATTR_PRTDEVTYPE is not *AFPDS.- Returns:
- The input stream object that can be used to read the contents of this spooled file.
- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system operating system is not at the correct level.- See Also:
getInputStream()
,getPageInputStream(com.ibm.as400.access.PrintParameterList)
-
getJobName
public java.lang.String getJobName()
Returns the name of the job that created the spooled file.- Returns:
- The job name.
-
getJobNumber
public java.lang.String getJobNumber()
Returns the number of the job that created the spooled file.- Returns:
- The job number.
-
getJobUser
public java.lang.String getJobUser()
Returns the ID of the user that created the spooled file.- Returns:
- The user ID.
-
getJobSysName
public java.lang.String getJobSysName()
Returns the name of the system where the spooled file was created.- Returns:
- The name of the system where the spooled file was created.
-
getCreateDate
public java.lang.String getCreateDate()
Returns the date of the spooled file creation. The date is encoded in the CYYMMDD format.- Returns:
- The date (CYYMMDD) of the spooled file creation.
-
getCreateTime
public java.lang.String getCreateTime()
Returns the time of spooled file creation. The time is encoded in the HHMMSS format.- Returns:
- The time (HHMMSS) of the spooled file creation.
-
getMessage
public AS400Message getMessage() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException
Returns the message that is associated with this spooled file. A spooled file has a message associated with it if its ATTR_SPLFSTATUS attribute returns *MESSAGE.- Returns:
- The AS400Message object that contains the message text, type, severity, id, date, time, and default reply.
- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.
-
getName
public java.lang.String getName()
Returns the name of the spooled file.- Returns:
- The name of the spooled file.
-
getNumber
public int getNumber()
Returns the number of the spooled file.- Returns:
- The number of the spooled file.
-
getPageInputStream
public PrintObjectPageInputStream getPageInputStream(PrintParameterList pageStreamOptions) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Returns a page input stream that can be used to read the contents of the spooled file, one page at a time.
See Example using PrintObjectPageInputStream- Parameters:
pageStreamOptions
- A print parameter list that contains parameters for generating the page input stream.
The following attributes are optional:- ATTR_MFGTYPE - Specifies the manufacturer type and model.
- ATTR_WORKSTATION_CUST_OBJECT - Specifies the integrated file system name of the workstation customization object to be used. The workstation customizing object associated with the manufacturer, type, and model is the default.
- ATTR_PAPER_SOURCE_1 - Specifies the paper size of drawer 1.
- ATTR_PAPER_SOURCE_2 - Specifies the paper size of drawer 2.
- ATTR_VIEWING_FIDELITY - Specifies the fidelity used to process pages.
- Returns:
- A page input stream object that can be used to read the contents of this spooled file, one page at a time.
- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system operating system is not at the correct level.
-
getTransformedInputStream
public PrintObjectTransformedInputStream getTransformedInputStream(PrintParameterList transformOptions) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Returns a transformed input stream that can be used to read the contents of the spooled file.
See Example using PrintObjectTransformedInputStream- Parameters:
transformOptions
- A print parameter list that contains parameters for generating the transformed input stream.
The following attribute MUST be set:- ATTR_MFGTYPE - Specifies the manufacturer, type, and model.
- ATTR_WORKSTATION_CUST_OBJECT - Specifies the integrated file system name of the workstation customization object to be used. The workstation customizing object associated with the manufacturer, type, and model is the default.
- ATTR_PAPER_SOURCE_1 - Specifies the paper size of drawer 1.
- ATTR_PAPER_SOURCE_2 - Specifies the paper size of drawer 2.
- Returns:
- The transformed input stream object that can be used to read the contents of the transformed spooled file.
- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system operating system is not at the correct level.
-
hold
public void hold(java.lang.String holdType) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Holds the spooled file.- Parameters:
holdType
- When to hold the spooled file. May be any of the following values:- *IMMED - The spooled file is held immediately.
- *PAGEEND - The spooled file is held at the end of the current page.
- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system operating system is not at the correct level.
-
move
public void move(SpooledFile targetSpooledFile) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Moves the spooled file to another output queue or to another position on the same output queue.- Parameters:
targetSpooledFile
- The spooled file to move this spooled file after. The targetSpooledFile and this spooled file must reside on the same system.- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system operating system is not at the correct level.
-
move
public void move(OutputQueue targetOutputQueue) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Moves the spooled file to another output queue.- Parameters:
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 system.- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system operating system is not at the correct level.
-
moveToTop
public void moveToTop() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Moves the spooled file to the first position on the output queue.- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system operating system is not at the correct level.
-
release
public void release() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Releases a held spooled file on the system.- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system operating system is not at the correct level.
-
sendNet
public void sendNet(PrintParameterList sendOptions) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException
Sends the spooled file to another user on the same system or to a remote system on the network. The equivalent of the system Send Network Spooled File (SNDNETSPLF) command will be issued against the spooled file.- Parameters:
sendOptions
- A print parameter list that contains the parameters for the send. The following attributes MUST be set:- ATTR_TOUSERID - Specifies the user ID to send the spooled file to.
- ATTR_TOADDRESS - Specifies the remote system to send the spooled file to.
- ATTR_DATAFORMAT - Specifies the data format in which to transmit the spooled file. May be either of *RCDDATA or *ALLDATA. *RCDDATA is the default.
- ATTR_VMMVSCLASS - Specifies the VM/MVS SYSOUT class for distributions sent to a VM host system or to an MVS host system. May be A to Z or 0 to 9. A is the default.
- ATTR_SENDPTY - Specifies the queueing priority used for this spooled file when it is being routed through a SNADS network. May be *NORMAL or *HIGH. *NORMAL is the default.
- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.
-
sendTCP
public void sendTCP(PrintParameterList sendOptions) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException
Sends a spooled file to be printed on a remote system. The equivalent of the Send TCP/IP Spooled File (SNDTCPSPLF) command will be issued against the spooled file. This is the system's version of the TCP/IP LPR command.- Parameters:
sendOptions
- A print parameter list that contains the parameters for the send. The following attributes MUST be set:- ATTR_RMTSYSTEM - Specifies the remote system to which the print request will be sent. May be a remote system name or the special value *INTNETADR.
- ATTR_RMTPRTQ - Specifies the name of the destination print queue.
- ATTR_DELETESPLF - Specifies whether or not to delete the spooled file after it has been successfully sent. May be *NO or *YES. *NO is the default.
- ATTR_DESTOPTION - Specifies a destination-dependant option. These options will be sent to the remote system with the spooled file.
- ATTR_DESTINATION - Specifies the type of system to which the spooled file is being sent. When sending to other IBM i systems, this value should be *AS/400. May also be *OTHER or *PSF/2. *OTHER is the default.
- ATTR_INTERNETADDR - Specifies the Internet address of the receiving system.
- ATTR_MFGTYPE - Specifies the manufacturer, type, and model when transforming print data from SCS or AFP to ASCII.
- ATTR_SCS2ASCII - Specifies whether the print data is to be transformed to ASCII. May be *NO or *YES. *NO is the default.
- ATTR_SEPPAGE - Specifies whether to print the separator page. May be *NO or *YES. *YES is the default.
- Throws:
AS400Exception
- If the 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 system.java.lang.InterruptedException
- If this thread is interrupted.
-
setAttributes
public void setAttributes(PrintParameterList attributes) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, RequestNotSupportedException
Sets one or more attributes of the object. See Spooled File Attributes for a list of valid attributes that can be changed.- Parameters:
attributes
- A print parameter list that contains the attributes to be changed.- Throws:
AS400Exception
- If the 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 systemjava.lang.InterruptedException
- If this thread is interrupted.RequestNotSupportedException
- If the requested function is not supported because the system operating system is not at the correct level.
-
-