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
Class describing unknown escape sequence.
-
Constructor Summary
ConstructorsConstructorDescriptionEscUnknown(int type, int subtype, int value, String data, boolean negated, boolean present)Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintgetEsc()Returns capital characer that marks the end of the escape sequence.Returns data present after ESC|*...booleanReturns whether '!' follows "ESC|".intReturns value that contains the lower-case characters between value and upper-case character that marks the end of the sequence.intgetValue()Returns value in ESC sequence, in any.booleanSpecifies whether a positive integer value is part of the escape sequence.voidvalidate(POSPrinterService srv, int station)Used to perform full validation of the print data.voidvalidateData(POSPrinterService srv, int station)Used to perform additional validation of the print data, if output to the given station occurs.
-
Constructor Details
-
EscUnknown
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
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
Description copied from class:POSPrinterService.PrintDataPartUsed 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:
validatein 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.PrintDataPartUsed 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:
validateDatain 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.
-