41
Chapter 4 API Reference
4
Builder class (Constructor)
Constructor for the Builder class. Initializes a Builder class instance.
Syntax
public Builder(String printerModel, int lang)
throws EposException
Parameter
printerModel : Specifies the model name for the target printer.
lang : Specifies the language specifications for the printer.
Exceptions
When processing fails, EposException is thrown with one of the following error values.
Example
Set value Description
"TM-T88V" TM-T88V
"TM-T70" TM-T70
"TM-U220" TM-U220
"TM-P60" TM-P60
Set value Description
Builder.MODEL_ANK ANK model
Builder.MODEL_JAPANESE Japanese model
Error status Description
ERR_PARAM Invalid parameter was passed.
ERR_MEMORY Could not allocate memory.
ERR_UNSUPPORTED An unsupported model name or unsupported language
specifications were specified.
ERR_FAILURE An unspecified error occurred.
try {
Builder builder = new Builder("TM-T88V", Builder.MODEL_ANK);
///Process///
} catch (EposException e) {
int errStatus = e.getErrorStatus();
}
If you are initializing the command buffer for the TM-T88V ANK model: