Class POSPrinterService.EscUnknown

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.posprinter.POSPrinterService.PrintDataPart
de.gmxhome.conrad.jpos.jpos_base.posprinter.POSPrinterService.EscUnknown
Enclosing class:
POSPrinterService

public static class POSPrinterService.EscUnknown extends POSPrinterService.PrintDataPart
Class describing unknown escape sequence.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EscUnknown​(int type, int subtype, int value, String data, boolean negated, boolean present)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns capital characer that marks the end of the escape sequence.
    Returns data present after ESC|*...
    boolean
    Returns whether '!' follows "ESC|".
    int
    Returns value that contains the lower-case characters between value and upper-case character that marks the end of the sequence.
    int
    Returns value in ESC sequence, in any.
    boolean
    Specifies whether a positive integer value is part of the escape sequence.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EscUnknown

      public EscUnknown(int type, int subtype, int value, String data, boolean negated, boolean present)
      Constructor.
      Parameters:
      type - Initial value for Esc.
      subtype - Initial value for Subtype.
      value - Initial value for Value.
      data - Initial value for EscData.
      negated - Initial value for Negated.
      present - Initial value for ValuePresent.
  • Method Details

    • getEscData

      public String getEscData()
      Returns data present after ESC|*... sequence. If no '*' follows '|', EscData is null.
      Returns:
      Fixed length data belonging to escape sequence.
    • getEsc

      public int getEsc()
      Returns capital characer that marks the end of the escape sequence.
      Returns:
      Sequence end character.
    • getSubtype

      public int getSubtype()
      Returns value that contains the lower-case characters between value and upper-case character that marks the end of the sequence. The codes of the lower-case characters are the digits of Subtype in base1000 representation, e.g. if the lower-case characters between value and upper-case character are "abc", Subtype will be (('a' * 1000) + 'b') * 1000 + 'c'.
      Returns:
      Lower-case character sequence before sequence end character, formatted as described.
    • getValue

      public int getValue()
      Returns value in ESC sequence, in any. 0 if no value is present.
      Returns:
      Sequence value.
    • getNegated

      public boolean getNegated()
      Returns whether '!' follows "ESC|".
      Returns:
      Negation flag: true if ! follows ESC|
    • getValuePresent

      public boolean getValuePresent()
      Specifies whether a positive integer value is part of the escape sequence.
      Returns:
      true if escape sequence contains a value.
    • 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.