Class POSPrinterService.PrintData
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.posprinter.POSPrinterService.PrintDataPart
de.gmxhome.conrad.jpos.jpos_base.posprinter.POSPrinterService.PrintData
- Enclosing class:
- POSPrinterService
Class describing printable part of print data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns character set to be used for output.Returns data to be printed.boolean
Returns whether PrintData needs mapping.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
-
PrintData
Constructor.- Parameters:
data
- Print data.mapping
- Character mapping by service (true) or by application (false).charset
- Character set to be used during print operation for data.
-
-
Method Details
-
getPrintData
Returns data to be printed.- Returns:
- Print data.
-
getServiceIsMapping
public boolean getServiceIsMapping()Returns whether PrintData needs mapping. If true, PrintData contains unmapped data and the service must perform character conversion, if necessary. If false, PrintData contains mapped data and the service does not need to perform conversion (PrintData will be copied character-to-byte into the output buffer).- Returns:
- Mapping flag as described.
-
getCharacterSet
public int getCharacterSet()Returns character set to be used for output.- Returns:
- Character set.
-
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.
-