command.append(StringUtil.byteToHexString(calcChecksum(command.toString())));
command.append(calcChecksum(command.toString()));
    public String buildCommand()    {        StringBuffer command = new StringBuffer(200);        int length = 0;        // CALC LENGTH        // length = trn + len + o|r + ot        length = 3 + 5 + 2 + 3;        // length += data        for(int i=0; i < myUcpFields.length; i++)        {            if (myUcpFields[i] != null)            {                length += myUcpFields[i].length();            }            length += 1;        }        // length += checksum        length += 2;        // HEADER (TRN/LEN/O|R/OT)        // TRN (2 num char)        command.append(StringUtil.intToString(myTrn, 2));        command.append('/');        // LEN (5 num char)        command.append(StringUtil.intToString(length, 5));        command.append('/');        // O|R (Char 'O' or 'R')        command.append(myOR);        command.append('/');        // OT  (2 num char)        command.append(StringUtil.intToString(myOT, 2));        command.append('/');        // DATA        for(int i=0; i < myUcpFields.length; i++)        {            if (myUcpFields[i] != null)            {                command.append(myUcpFields[i]);            }            command.append('/');        }        // CHECKSUM        command.append(StringUtil.byteToHexString(calcChecksum(command.toString())));        return command.toString();    }