Class POSPrinterService.ControlChar
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.posprinter.POSPrinterService.PrintDataPart
de.gmxhome.conrad.jpos.jpos_base.posprinter.POSPrinterService.ControlChar
- Enclosing class:
- POSPrinterService
Class describing control characters in print data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchar
Returns control character to be handled.void
validate(POSPrinterService srv, int station)
Used to perform full validation of the print data.void
validateData(POSPrinterService srv, int station)
Used to perform additional validation of the print data, if output to the given station occurs.
-
Constructor Details
-
ControlChar
public ControlChar(char control)Constructor- Parameters:
control
- Control character to be printed. Only CR and LF are valid control characters.
-
-
Method Details
-
getControlCharacter
public char getControlCharacter()Returns control character to be handled. One of CR or LF.- Returns:
- '\n' or '\r'.
-
validate
Description copied from class:POSPrinterService.PrintDataPart
Used to perform full validation of the print data. To do this, relevant capabilities will be checked and the corresponding method of the POSPrinterInterface used by the given POSPrinterService will be called.- Specified by:
validate
in classPOSPrinterService.PrintDataPart
- Parameters:
srv
- POSPrinterService to be used for additional validation.station
- Printer station for which the validation shall be checked.- Throws:
jpos.JposException
- If not precisely supported with ErrorCode E_ILLEGAL, if not supported and no workaround is possible, with ErrorCode E_FAILURE.
-
validateData
Description copied from class:POSPrinterService.PrintDataPart
Used to perform additional validation of the print data, if output to the given station occurs. To do this, simply the corresponding method of the POSPrinterInterface used by the given POSPrinterService will be called.- Specified by:
validateData
in classPOSPrinterService.PrintDataPart
- Parameters:
srv
- POSPrinterService to be used for validation.station
- Printer station used for validation.- Throws:
jpos.JposException
- If not precisely supported with ErrorCode E_ILLEGAL, if not supported and no workaround is possible, with ErrorCode E_FAILURE.
-