sb.append(vt.getASCIIChar(cByte[f] & 0xff));
sb.append(vt.ebcdic2uni(cByte[f] & 0xff));
   public String parseData(byte[] cByte) {      if (!translateIt) {         return sbdata.toString();      }      StringBuffer sb = new StringBuffer(bufferLength);      int end = startOffset + length - 1;      switch (type) {         case 'P':   // Packed decimal format            // example field of buffer length 4 with decimal precision 0            //    output length is (4 * 2) -1 = 7            //            //    each byte of the buffer contains 2 digits, one in the zone            //    portion and one in the zone portion of the byte, the last            //    byte of the field contains the last digit in the ZONE            //    portion and the sign is contained in the DIGIT portion.            //            //    The number 1234567 would be represented as follows:            //    byte 1 of 4 -> 12            //    byte 2 of 4 -> 34            //    byte 3 of 4 -> 56            //    byte 4 of 4 -> 7F    The F siginifies a positive number            //            //    The number -1234567 would be represented as follows:            //    byte 1 of 4 -> 12            //    byte 2 of 4 -> 34            //    byte 3 of 4 -> 56            //    byte 4 of 4 -> 7D    The D siginifies a negative number            //            for (int f = startOffset-1;f < end -1; f++) {               byte bzd = cByte[f];               int byteZ = (bzd >> 4) & 0x0f ;  // get the zone portion               int byteD = (bzd & 0x0f);        // get the digit portion               sb.append(byteZ); // assign the zone portion as the first digit               sb.append(byteD); // assign the digit portion as the second digit            }            // here we obtain the last byte to determine the sign of the field            byte bzd = cByte[end-1];            int byteZ = (bzd >> 4) & 0x0f ;  // get the zone portion            int byteD = (bzd & 0x0f);        // get the digit portion            sb.append(byteZ);                // append the zone portion as the                                             // the last digit of the number            // Here we interrogate the the DIGIT portion for the sign            //    0x0f = positive   -> 0x0f | 0x0d = 0x0f            //    0x0d = negative   -> 0x0d | 0x0d = 0x0d            if ((byteD | 0x0d) == 0x0d)               sb.insert(0,'-');            else               sb.insert(0,'+');            break;         case 'S':   // Signed decimal format            // example field of buffer length 5 with decimal precision 0            //    output length is 5            //            //    each byte of the buffer contains a digit.  The zone portion            //    contain F for the EBCDIC number not 3 for ASCII, the digit            //    portion contains the number, the last byte of the field            //    contains the last digit in the DIGIT portion and the sign is            //    contained in the ZONE portion.            //            //    The number 12345 would be represented as follows:            //    byte 1 of 5 -> F1            //    byte 2 of 5 -> F2            //    byte 3 of 5 -> F3            //    byte 4 of 5 -> F4            //    byte 5 of 5 -> F5 The F in the zone portion signifies positive            //            //    The number -12345 would be represented as follows:            //    byte 1 of 5 -> F1            //    byte 2 of 5 -> F2            //    byte 3 of 5 -> F3            //    byte 4 of 5 -> F4            //    byte 5 of 5 -> D5 The D in the zone portion signifies negative            for (int f = startOffset-1;f < end; f++) {               // we only take the digit portion of the byte               sb.append((cByte[f] & 0x0f));            }            // Here we interrogate the the ZONE portion for the sign            //    0xf0 = positive   -> 0xf5 & 0xf0 = 0xf0            //    0xd0 = negative   -> 0xd5 & 0xf0 = 0xd0            if ((cByte[end - 1] & 0xf0) == 0xd0)               sb.insert(0,'-');            else               sb.insert(0,'+');            break;         default:            for (int f = startOffset-1;f < end; f++) {               sb.append(vt.getASCIIChar(cByte[f] & 0xff));            }      }      if (decPos > 0) {         int o = sb.length();         sb.insert(o - decPos,decChar);      }      data = sb.toString();      return data;   }