Print classes
Print objects include spooled files, output queues, printers,
printer files, writer jobs, and Advanced Function Printing (AFP)
resources, which include fonts, form definitions, overlays, page
definitions, and page segments. AFP resources are accessible only
on Version 3 Release 7 (V3R7) and later versions of OS/400. (Trying to
open an AFPResourceList to a system that is running an earlier
version than V3R7 generates a RequestNotSupportedException
exception.)
The IBM Toolbox for Java classes for print objects are organized
on a base class,
PrintObject, and on a subclass for each of the six types of
print objects. The base class contains the methods and attributes
common to all server print objects. The subclasses contain methods
and attributes specific to each subtype.
Use the print classes for the following:
- Working with server print objects:
- PrintObjectList class - use for
listing and working with server print objects. (Print objects
include spooled files, output queues, printers, Advanced Function
Printing (AFP) resources, printer files, and writer jobs)
- PrintObject base class - use for
working with print objects
- Retrieving PrintObject
attributes
- Creating new server spooled files
using the SpooledFileOutputStream class (use for EBCDIC-based
printer data)
- Generating SNA Character Stream
(SCS) printer data streams
- Reading spooled files and AFP
resources using the PrintObjectInputStream
- Reading spooled files using
PrintObjectPageInputStream and
PrintObjectTransformedInputStream
- Viewing Advanced Function Printing (AFP)
and SNA Character Stream (SCS)
spooled files
Examples
- The Create Spooled
File Example shows how to create a spooled file on a server
from an input stream.
- The Create SCS
Spooled File Example shows how to generate a SCS data stream
using the SCS3812Writer class, and how to write the stream to a
spooled file on the server.
- The Read Spooled File
Example shows how to read an existing server spooled file.
- The first
Asynchronous List Example shows how to asynchronously list all
spooled files on a system and how to use the
PrintObjectListListener interface to get feedback as the list is
being built.
- The second
Asynchronous List Example shows how to asynchronously list all
spooled files on a system without using the
PrintObjectListListener interface
- The Synchronous
List Example shows how to synchronously list all spooled files
on a system.