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

public static class POSPrinterService.PrintData extends POSPrinterService.PrintDataPart
Class describing printable part of print data.
  • Constructor Details

    • PrintData

      public PrintData(String data, boolean mapping, int charset)
      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

      public String 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

      public void validate(POSPrinterService srv, int station) throws jpos.JposException
      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 class POSPrinterService.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

      public void validateData(POSPrinterService srv, int station) throws jpos.JposException
      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 class POSPrinterService.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.