public class SGD
extends Object
Modifier and Type | Method and Description |
---|---|
static void |
DO(java.io.OutputStream responseData,
String setting,
String value,
Connection printerConnection)
Constructs an SGD DO command and sends it to the printer.
|
static void |
DO(java.io.OutputStream responseData,
String setting,
String value,
Connection printerConnection,
int maxTimeoutForRead,
int timeToWaitForMoreData)
Constructs an SGD DO command and sends it to the printer.
|
static String |
DO(String setting,
String value,
Connection printerConnection)
Constructs an SGD DO command and sends it to the printer.
|
static String |
DO(String setting,
String value,
Connection printerConnection,
int maxTimeoutForRead,
int timeToWaitForMoreData)
Constructs an SGD DO command and sends it to the printer.
|
static String |
GET(String setting,
Connection printerConnection)
Constructs an SGD GET command and sends it to the printer.
|
static String |
GET(String setting,
Connection printerConnection,
int maxTimeoutForRead,
int timeToWaitForMoreData)
Constructs an SGD GET command and sends it to the printer.
|
static void |
SET(String setting,
int value,
Connection printerConnection)
Constructs an SGD SET command and sends it to the printer.
|
static void |
SET(String setting,
String value,
Connection printerConnection)
Constructs an SGD SET command and sends it to the printer.
|
public static void SET(String setting, int value, Connection printerConnection) throws ConnectionException
DO(String, String, Connection)
command.setting
- the SGD settingvalue
- the setting's valueprinterConnection
- the connection to send the command toConnectionException
- if an I/O error occursSET(String, String, Connection)
public static void SET(String setting, String value, Connection printerConnection) throws ConnectionException
DO(String, String, Connection)
command.setting
- the SGD settingvalue
- the setting's valueprinterConnection
- the connection to send the command toConnectionException
- if an I/O error occursSET(String, int, Connection)
public static String GET(String setting, Connection printerConnection) throws ConnectionException
Connection.getMaxTimeoutForRead()
milliseconds for any data to be received. Once some data has been
received it waits until no more data is available within Connection.getTimeToWaitForMoreData()
milliseconds. This method returns the SGD value associated with setting
without the surrounding
quotes.setting
- the SGD settingprinterConnection
- the connection to send the command toConnectionException
- if an I/O error occurspublic static String GET(String setting, Connection printerConnection, int maxTimeoutForRead, int timeToWaitForMoreData) throws ConnectionException
maxTimeoutForRead
milliseconds for any data to be received. Once some data has been received it
waits until no more data is available within timeToWaitForMoreData
milliseconds. This method returns
the SGD value associated with setting
without the surrounding quotes.setting
- the SGD settingprinterConnection
- the connection to send the command tomaxTimeoutForRead
- the maximum time, in milliseconds, to wait for a response from the printertimeToWaitForMoreData
- the maximum time, in milliseconds, to wait in-between reads after the initial data
is receivedConnectionException
- if an I/O error occurspublic static String DO(String setting, String value, Connection printerConnection) throws ConnectionException
Connection.getMaxTimeoutForRead()
milliseconds for any data to be received. Once some data has been
received it waits until no more data is available within Connection.getTimeToWaitForMoreData()
milliseconds. This method returns the SGD value associated with setting
without the surrounding
quotes.setting
- the SGD settingvalue
- the setting's valueprinterConnection
- the connection to send the command toConnectionException
- if an I/O error occurspublic static void DO(java.io.OutputStream responseData, String setting, String value, Connection printerConnection) throws ConnectionException
Connection.getMaxTimeoutForRead()
milliseconds for any data to be received. Once some data has been
received it waits until no more data is available within Connection.getTimeToWaitForMoreData()
milliseconds. This method write the SGD value associated with setting
, without the surrounding
quotes, to responseData
.responseData
- output stream to receive the response.setting
- the SGD settingvalue
- the setting's valueprinterConnection
- the connection to send the command toConnectionException
- if an I/O error occurspublic static String DO(String setting, String value, Connection printerConnection, int maxTimeoutForRead, int timeToWaitForMoreData) throws ConnectionException
maxTimeoutForRead
milliseconds for any data to be received. Once some data has been received it
waits until no more data is available within timeToWaitForMoreData
milliseconds. This method returns
the SGD value associated with setting
without the surrounding quotes.setting
- the SGD settingvalue
- the setting's valueprinterConnection
- the connection to send the command tomaxTimeoutForRead
- the maximum time, in milliseconds, to wait for a response from the printertimeToWaitForMoreData
- the maximum time, in milliseconds, to wait in-between reads after the initial data
is receivedConnectionException
- if an I/O error occurspublic static void DO(java.io.OutputStream responseData, String setting, String value, Connection printerConnection, int maxTimeoutForRead, int timeToWaitForMoreData) throws ConnectionException
maxTimeoutForRead
milliseconds for any data to be received. Once some data has been received it
waits until no more data is available within timeToWaitForMoreData
milliseconds. This method returns
the SGD value associated with setting
without the surrounding quotes.responseData
- output stream to receive the response.setting
- the SGD settingvalue
- the setting's valueprinterConnection
- the connection to send the command tomaxTimeoutForRead
- the maximum time, in milliseconds, to wait for a response from the printertimeToWaitForMoreData
- the maximum time, in milliseconds, to wait in-between reads after the initial data
is receivedConnectionException
- if an I/O error occurs
© 2017 ZIH Corp. All Rights Reserved.