com.epson.EpsonCom
Class EpsonTools

java.lang.Object
  extended by com.epson.EpsonCom.EpsonTools

public class EpsonTools
extends java.lang.Object

EpsonTools Class


Constructor Summary
EpsonTools()
           
 
Method Summary
static java.util.Vector<java.lang.Byte> convertEscposToBinary(java.lang.String escpos)
          ------------------------------------------------------------------------------------- convertEscposToBinary Converts an EscPos string (like e.g.
static java.util.Vector<java.lang.Byte> convertHexadecimalToBinary(java.util.Vector<java.lang.Byte> HexadecimalData)
          ------------------------------------------------------------------------------------- convertHexadecimalToBinary Converts data that is in ASCII hexadecimal format into binary data ASCII hexadecimal means that a binary value of e.g.
static java.lang.String getErrorText(EpsonCom.ERROR_CODE errorcode)
          ------------------------------------------------------------------------------------- getErrorText Converts a numeric error code into the corresponding error text
static java.lang.Boolean isEven(int number)
          ------------------------------------------------------------------------------------- isEven Checks if a int number is even
static boolean isInteger(java.lang.String input)
          ------------------------------------------------------------------------------------- isInteger Checks if a string is purely numeric (without decimals)
static byte xtod(byte c)
          ------------------------------------------------------------------------------------- xtod Converts a single hex character 0-F (ASCII) into decimal 0-15
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EpsonTools

public EpsonTools()
Method Detail

convertHexadecimalToBinary

public static java.util.Vector<java.lang.Byte> convertHexadecimalToBinary(java.util.Vector<java.lang.Byte> HexadecimalData)
------------------------------------------------------------------------------------- convertHexadecimalToBinary Converts data that is in ASCII hexadecimal format into binary data ASCII hexadecimal means that a binary value of e.g. 0x35 is represented by the ASCII values for the characters '3' and '5' which would be 0x33 0x35

Parameters:
HexadecimalData - the hexadecimal data that will be converted
Returns:
NSData with the resulting binary data ------------------------------------------------------------------------------------

xtod

public static byte xtod(byte c)
------------------------------------------------------------------------------------- xtod Converts a single hex character 0-F (ASCII) into decimal 0-15

Parameters:
c - byte with the hex character
Returns:
byte: the decimal value of the hex character, 0 if c was not 1-F. ------------------------------------------------------------------------------------

convertEscposToBinary

public static java.util.Vector<java.lang.Byte> convertEscposToBinary(java.lang.String escpos)
------------------------------------------------------------------------------------- convertEscposToBinary Converts an EscPos string (like e.g. "GS I 1") into binary

Parameters:
escpos - String with the ESC/POS
Returns:
Vector with the binary ------------------------------------------------------------------------------------

isInteger

public static boolean isInteger(java.lang.String input)
------------------------------------------------------------------------------------- isInteger Checks if a string is purely numeric (without decimals)

Parameters:
input - string
Returns:
true = numeric, false=not numeric ------------------------------------------------------------------------------------

getErrorText

public static java.lang.String getErrorText(EpsonCom.ERROR_CODE errorcode)
------------------------------------------------------------------------------------- getErrorText Converts a numeric error code into the corresponding error text

Parameters:
errorcode: - error code as defined in EpsonCom.ERROR_CODES enum
Returns:
string with the error text ------------------------------------------------------------------------------------

isEven

public static java.lang.Boolean isEven(int number)
------------------------------------------------------------------------------------- isEven Checks if a int number is even

Parameters:
number: - the number to check
Returns:
true if it is even, false if it is not ------------------------------------------------------------------------------------