private int decodeSize(byte[] buffer){
  BigInteger bi=new BigInteger(buffer);
  int tmpSize=bi.intValue();
  if (tmpSize < 0) {
    logger.warning("Invalid Frame Size of:" + tmpSize + "Decoded from bin:"+ Integer.toBinaryString(tmpSize)+ "Decoded from hex:"+ Integer.toHexString(tmpSize));
  }
  return tmpSize;
}

private int decodeSize ( byte [ ] buffer ) { BigInteger bi = new BigInteger ( buffer ) ; int tmpSize = bi . intValue ( ) ; if ( tmpSize < 0 ) { logger . warning ( "Invalid Frame Size of:" + tmpSize + "Decoded from bin:" + Integer . toBinaryString ( tmpSize ) + "Decoded from hex:" + Integer . toHexString ( tmpSize ) ) ; } return tmpSize ; }
read frame size , which has to be decoded
