if(endianStyle.equals("BigEndian"))
if(endianStyle.equals(Constants.BIG_ENDIAN))
    private String convertBinaryDataToString (String endianStyle,                                               DataFormat binaryFormatObj,                                               String strDataRep )     {        byte[] bb = strDataRep.getBytes();        if (binaryFormatObj instanceof BinaryIntegerDataFormat) {            int i;            if(((BinaryIntegerDataFormat) binaryFormatObj).numOfBytes() == 2)             {               // 16 bit                if(endianStyle.equals("BigEndian"))                   i = (bb[0]&0xFF) << 8  | (bb[1]&0xFF);               else                   i = (bb[1]&0xFF) << 8  | (bb[0]&0xFF);/*Log.error("integer bits are: ");int sbyte = 0;for (int j=sbyte; j<sbyte+2; j++) {   for(int k=7; k >=0; k--) {      int newvalue = (bb[j] >> k)&0x01;      Log.error(""+newvalue);   }   Log.error(" ");}Log.errorln("");*/               strDataRep = new Integer(i).toString();            }             else if(((BinaryIntegerDataFormat) binaryFormatObj).numOfBytes() == 4)             {               // 32 bit (long)                if(endianStyle.equals("BigEndian"))                   i = (bb[0]&0xFF) << 24  | (bb[1]&0xFF) << 16 | (bb[2]&0xFF) << 8 | (bb[3]&0xFF);               else                   i = (bb[3]&0xFF) << 24  | (bb[2]&0xFF) << 16 | (bb[1]&0xFF) << 8 | (bb[0]&0xFF);               strDataRep = new Integer(i).toString();            }             else             {               Log.errorln("Cant treat binaryIntegers that arent either 16 or 32 bit. Ignoring value.");            }         } else if (binaryFormatObj instanceof BinaryFloatDataFormat) {            int i;            if(((BinaryFloatDataFormat) binaryFormatObj).numOfBytes() == 4)             {               // 32 bit float               if(endianStyle.equals("BigEndian"))                   i = bb[0] << 24  | (bb[1]&0xFF) << 16 | (bb[2]&0xFF) << 8 | (bb[3]&0xFF);               else                  i = bb[3] << 24  | (bb[2]&0xFF) << 16 | (bb[1]&0xFF) << 8 | (bb[0]&0xFF);               float myfloat = Float.intBitsToFloat(i);               strDataRep = new Float(myfloat).toString();            }             else if(((BinaryFloatDataFormat) binaryFormatObj).numOfBytes() == 8)             {               // 64 bit float               strDataRep = new String("");            }             else             {               Log.warnln("Got Floating point number with neither 32 or 64 bits, ignoring.");               strDataRep = new String("");            }         }        return strDataRep;    }