Code example for BigInteger

Methods: multiply

0
      public byte[] next() { 
        i++;
        if (i == 0) return a;
        if (i == num + 1) return b;
         
        BigInteger curBI = startBI.add(intervalBI.multiply(BigInteger.valueOf(i)));
        byte [] padded = curBI.toByteArray();
        if (padded[1] == 0)
          padded = tail(padded, padded.length - 2);
        else 
          padded = tail(padded, padded.length - 1);
        return padded;
      } 
 
      @Override 
      public void remove() { 
        throw new UnsupportedOperationException();
      } 
       
    };