code: public BigInteger getDifficultyTargetAsInteger() throws VerificationException {
          BigInteger target = Utils.decodeCompactBits(difficultyTarget);
          if (target.signum() <= 0 || target.compareTo(params.maxTarget) > 0)
              throw new VerificationException("Difficulty target is bad: " + target.toString());
          return target;
      }
docs: Returns the difficulty target as a 256 bit value that can be compared to a SHA-256 hash. Inside a block the
  target is represented using a compact form. If this form decodes to a value that is out of bounds, an exception
  is thrown.