91
Chapter 4 API Reference
4
sendData
Sends a print document created using the Builder class.
Syntax
public void sendData(Builder builder, int timeout
, int[] status) throws EposException
Parameter
builder : Specifies a Builder class instance. For details on the Builder class, refer to Builder class
(p.39).
timeout : Specifies the transmission/reception waiting timeout time.
Specifies an integer in the range 0-600000 (in milliseconds).
status : The printer status when command transmission ended is set. A combination of printer
status settings is set. For details, refer to Printer Status List (p.37).
Exceptions
When processing fails, EposException is thrown with one of the following error values.
• If you are using a Bluetooth connection, it may not be able to detect the offline status,
and timeout errors may occur.
• If you are using a Bluetooth connection, it may not be able to detect that the printer's
power is off.
In an exception occurs, use the getPrinterStatus (p.94) with exception processing to get the
printer status.
Error status Description
ERR_PARAM Invalid parameter was passed.
ERR_ILLEGAL This API was called when communication had not started yet.
ERR_PROCESSING Could not execute process.
ERR_TIMEOUT Could not send all the data within the specified time.
ERR_CONNECT Connection error occurred
ERR_MEMORY Could not allocate memory.
ERR_OFF_LINE The printer was offline.
ERR_FAILURE An unspecified error occurred.