public class CupsClient
extends java.lang.Object
| Constructor and Description |
|---|
CupsClient()
Generates a client for the access to a local CUPS on port 631.
|
CupsClient(java.net.URI cupsURI)
Generates a client for the access to the given URI to CUPS.
|
| Modifier and Type | Method and Description |
|---|---|
IppResponse |
cancelJob(int jobId,
java.net.URI printerURI)
Cancels a job.
|
IppResponse |
createJob(java.net.URI printerURI)
Creates a Job.
|
java.net.URI |
getCupsURI()
Gets the URI of the CUPS server.
|
IppResponse |
print(java.net.URI printerURI,
java.nio.file.Path... files)
Sends a list of files as one job to the given printer.
|
IppResponse |
print(java.net.URI printerURI,
java.nio.file.Path path)
Sends a print job to the printer.
|
void |
replay(java.nio.file.Path dir)
CupsServer allows you to record IPP requests. |
IppResponse |
send(IppRequest ippRequest)
Sends the IPP request to CUPS.
|
IppResponse |
send(Operation op)
Sends an IPP operation to CUPS.
|
IppResponse |
sendDocument(java.net.URI printerURI,
java.nio.file.Path path,
int jobId,
boolean lastDocument) |
java.lang.String |
toString() |
public CupsClient()
public CupsClient(java.net.URI cupsURI)
cupsURI - normally "http://localhost:631" on Linux and Macpublic java.net.URI getCupsURI()
public IppResponse print(java.net.URI printerURI, java.nio.file.Path path)
printerURI - printer URIpath - file to be printedpublic IppResponse print(java.net.URI printerURI, java.nio.file.Path... files)
printerURI - where to send the filesfiles - the files to be printedpublic IppResponse sendDocument(java.net.URI printerURI, java.nio.file.Path path, int jobId, boolean lastDocument)
public IppResponse createJob(java.net.URI printerURI)
printerURI - where to send the files after creationpublic IppResponse cancelJob(int jobId, java.net.URI printerURI)
jobId - the job id which should be cancelledprinterURI - the printer uripublic IppResponse send(Operation op)
op - IPP oerationpublic IppResponse send(IppRequest ippRequest)
ippRequest - IPP requestpublic void replay(java.nio.file.Path dir)
throws java.io.IOException
CupsServer allows you to record IPP requests.
This method allows you to replay these recorded IPP requests.dir - directory where the requests are recordedjava.io.IOException - the io exceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018–2020. All rights reserved.