/libcore/ojluni/src/main/java/java/util/ |
H A D | Base64.java | 402 int bits = (src[sp0++] & 0xff) << 16 | 405 dst[dp0++] = (byte)base64[(bits >>> 18) & 0x3f]; 406 dst[dp0++] = (byte)base64[(bits >>> 12) & 0x3f]; 407 dst[dp0++] = (byte)base64[(bits >>> 6) & 0x3f]; 408 dst[dp0++] = (byte)base64[bits & 0x3f]; 691 int bits = 0; 716 bits |= (b << shiftto); 719 dst[dp++] = (byte)(bits >> 16); 720 dst[dp++] = (byte)(bits >> 8); 721 dst[dp++] = (byte)(bits); 869 private int bits = 0; // 24-bit buffer for decoding field in class:Base64.DecInputStream [all...] |
H A D | Random.java | 57 * up to 32 pseudorandomly generated bits. 162 * happens to use only 48 bits of the given seed. In general, however, 163 * an overriding method may use all 64 bits of the {@code long} 178 * {@code int} value and if the argument {@code bits} is between 180 * bits of the returned value will be (approximately) independently 186 * <pre>{@code (int)(seed >>> (48 - bits))}.</pre> 193 * @param bits random bits 198 protected int next(int bits) { argument 205 return (int)(nextseed >>> (48 - bits)); [all...] |
H A D | Arrays.java | 4040 long bits = Double.doubleToLongBits(element); 4041 result = 31 * result + (int)(bits ^ (bits >>> 32));
|
/libcore/ojluni/src/main/java/sun/nio/fs/ |
H A D | UnixFileAttributes.java | 217 int bits = (st_mode & UnixConstants.S_IAMB); 220 if ((bits & UnixConstants.S_IRUSR) > 0) 222 if ((bits & UnixConstants.S_IWUSR) > 0) 224 if ((bits & UnixConstants.S_IXUSR) > 0) 227 if ((bits & UnixConstants.S_IRGRP) > 0) 229 if ((bits & UnixConstants.S_IWGRP) > 0) 231 if ((bits & UnixConstants.S_IXGRP) > 0) 234 if ((bits & UnixConstants.S_IROTH) > 0) 236 if ((bits & UnixConstants.S_IWOTH) > 0) 238 if ((bits [all...] |
/libcore/ojluni/src/main/java/sun/security/util/ |
H A D | BitArray.java | 49 private static int position(int idx) { // bits big-endian in each unit 93 2. zero out extra bits in the last byte 103 * Create a BitArray whose bits are those of the given array 106 public BitArray(boolean[] bits) { argument 107 length = bits.length; 111 set(i, bits[i]); 165 * will be contain zeros in any bits that do not have corresponding 166 * bits in the BitArray. (This matters only if the BitArray's size 191 boolean[] bits = new boolean[length]; 194 bits[ [all...] |
H A D | DerOutputStream.java | 235 * @param bits the bit string, MSB first 237 public void putBitString(byte[] bits) throws IOException { argument 239 putLength(bits.length + 1); 241 write(bits); 248 * @param bits the bit string, MSB first 251 byte[] bits = ba.toByteArray(); 254 putLength(bits.length + 1); 255 write(bits.length*8 - ba.length()); // excess bits in last octet 256 write(bits); [all...] |
H A D | DerInputBuffer.java | 209 throw new IOException("Invalid number of padding bits"); 211 // minus the first byte which indicates the number of padding bits 215 // get rid of the padding bits 243 throw new IOException("Invalid value for unused bits: " + unusedBits); 245 byte[] bits = new byte[len - 1]; 246 // number of valid bits 247 int length = (bits.length == 0) ? 0 : bits.length * 8 - unusedBits; 249 System.arraycopy(buf, pos + 1, bits, 0, len - 1); 251 BitArray bitArray = new BitArray(length, bits); [all...] |
H A D | ObjectIdentifier.java | 477 * Repack all bits from input to output. On the both sides, only a portion 478 * (from the least significant bit) of the 8 bits in a byte is used. This 479 * number is defined as the number of useful bits (NUB) for the array. All the 480 * used bits from the input byte array and repacked into the output in the 481 * exactly same order. The output bits are aligned so that the final bit of 485 * necessary. All unused bits in the output are also zeroed. 490 * The first 2 bits of the output bytes are unused bits. The other bits 491 * turn out to be 000001 001100. While the 8 bits o [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
H A D | BigIntegerConstructorsTest.java | 739 * Create a random number of 75 bits length. 752 int bits; 755 bits = 128; 756 b = new BigInteger(bits, 10, rnd); 757 assertEquals(b.toString(), bits, b.bitLength()); 759 // Create a prime number of 25 bits length. 760 bits = 25; 761 b = new BigInteger(bits, 10, rnd); 762 assertEquals(b.toString(), bits, b.bitLength()); 764 // Create a prime number of 18 bits lengt [all...] |
/libcore/ojluni/src/main/java/java/lang/ |
H A D | Double.java | 119 * The number of bits used to represent a {@code double} value. 306 // Isolate significand bits and OR in a high-order bit 754 long bits = doubleToLongBits(value); 755 return (int)(bits ^ (bits >>> 32)); 811 * 62-52 (the bits that are selected by the mask 813 * (the bits that are selected by the mask 833 * @return the bits that represent the floating-point number. 854 * 62-52 (the bits that are selected by the mask 856 * (the bits tha 945 longBitsToDouble(long bits) argument [all...] |
H A D | Float.java | 117 * The number of bits used to represent a {@code float} value. 720 * Bits 30-23 (the bits that are selected by the mask 722 * Bits 22-0 (the bits that are selected by the mask 741 * @return the bits that represent the floating-point number. 762 * Bits 30-23 (the bits that are selected by the mask 764 * Bits 22-0 (the bits that are selected by the mask 786 * @return the bits that represent the floating-point number. 817 * int s = ((bits >> 31) == 0) ? 1 : -1; 818 * int e = ((bits >> 23) & 0xff); 820 * (bits 850 intBitsToFloat(int bits) argument [all...] |
/libcore/luni/src/main/java/java/math/ |
H A D | NativeBN.java | 122 public static native void BN_generate_prime_ex(long ret, int bits, boolean safe, argument 124 // int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe,
|
H A D | BigDecimal.java | 467 long bits = Double.doubleToLongBits(val); // IEEE-754 471 scale = 1075 - (int)((bits >> 52) & 0x7FFL); 472 // Extracting the 52 bits of the mantissa. 473 mantissa = (scale == 1075) ? (bits & 0xFFFFFFFFFFFFFL) << 1 474 : (bits & 0xFFFFFFFFFFFFFL) | 0x10000000000000L; 486 if((bits >> 63) != 0) { 1648 int oneBitMask; // mask of bits 2411 * If scale <= -64 there are at least 64 trailing bits zero in 2438 * If scale <= -32 there are at least 32 trailing bits zero in 2543 long bits; // IEE [all...] |
/libcore/ojluni/src/main/java/java/text/ |
H A D | ChoiceFormat.java | 549 long bits = Double.doubleToLongBits(d); 550 long significand = bits & SIGNIFICAND; 551 if (bits < 0) { 554 long exponent = bits & EXPONENT; 562 bits = exponent | (significand & ~EXPONENT); 563 return Double.longBitsToDouble(bits); 607 /* hold all bits in a long for later use */ 608 long bits = Double.doubleToLongBits(d); 611 long magnitude = bits & ~SIGN; 614 if ((bits > [all...] |
/libcore/luni/src/main/native/ |
H A D | cbigint.h | 28 single: 31 = sign bit, 30..23 = exponent (8 bits), 22..0 = significand (23 bits) 29 double: 63 = sign bit, 62..52 = exponent (11 bits), 51..0 = significand (52 bits) 30 inf == (all exponent bits set) and (all mantissa bits clear) 31 nan == (all exponent bits set) and (at least one mantissa bit set) 33 zero == (all exponent bits clear) and (all mantissa bits clear) 34 denormal == (all exponent bits clea [all...] |
H A D | java_math_NativeBN.cpp | 374 // In the negative case, the number of bits in a is the same as the number of bits in |a|, 505 static void NativeBN_BN_generate_prime_ex(JNIEnv* env, jclass, jlong ret, int bits, argument 508 if (!BN_generate_prime_ex(toBigNum(ret), bits, safe, toBigNum(add), toBigNum(rem),
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
H A D | RandomTest.java | 272 protected int next(int bits) { argument 274 return super.next(bits);
|
/libcore/ojluni/src/main/java/sun/invoke/util/ |
H A D | Wrapper.java | 109 /** How many bits are in the wrapped value? Returns 0 for OBJECT or VOID. */ 568 private static boolean boolValue(byte bits) { argument 569 bits &= 1; // simple 31-bit zero extension 570 return (bits != 0);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
H A D | FloatTest.java | 175 int bits = Float.floatToIntBits(f); 176 float r = Float.intBitsToFloat(bits); 186 assertTrue("Wrong raw bits", Float.floatToRawIntBits(f) == i); 224 int bits = Float.floatToIntBits(f); 225 float r = Float.intBitsToFloat(bits);
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
H A D | ThreadLocalRandom.java | 197 protected int next(int bits) { argument 198 return (int)(mix64(nextSeed()) >>> (64 - bits));
|
/libcore/luni/src/test/java/libcore/java/util/ |
H A D | RandomTest.java | 32 @Override protected synchronized int next(int bits) { return state.length(); }
|