3.4. PortInfo
This class holds information and model information for connecting to the Star printer.
Member
Name
Contents
Acquires the printer port name.
Get the Mac address of the printer.
Get the model name of the printer.
Get the USB serial number of the printer of the USB interface.
3.4.1. getPortName
Acquires the printer port name.
Declaration
public String getPortName();
Parameter
None
Return value
Contents
Type
Character string to specify the port for communication with the printerCan be used to specify the printer connection with the getPort method.String
3.4.2. getMacAddress
Get the Mac address of the printer.
Declaration
public String getMacAddress();
Parameter
None
Return value
Contents
Type
Character string that indicates the printer’s MAC address.If connecting to the printer via a Bluetooth interface, it can be used to specify the printer connection with the getPort method.If connecting to the printer via a USB interface, it returns an empty string.String
3.4.3. getModelName
Get the model name of the printer.
Refer to The printer model names included in the PortInfo .
Declaration
public String getModelName();
Parameter
None
Return value
Contents
Type
Model name
String
3.4.4. getUSBSerialNumber
Get the USB serial number of the printer of the USB interface.
Declaration
public String getUSBSerialNumber();
Parameter
None
Return value
Contents
Type
USB printer serial numberIf connecting to the printer via a USB interface, it can be used to specify the printer connection with the getPort method.String