Home
last modified time | relevance | path

Searched refs:BYTES (Results 1 – 25 of 63) sorted by relevance

123

/libcore/ojluni/src/main/java/java/nio/
DDirectByteBuffer.java382 int newPosition = position + Character.BYTES; in getChar()
396 checkIndex(i, Character.BYTES); in getChar()
430 putChar(ix(nextPutIndex(Character.BYTES)), x); in putChar()
442 putChar(ix(checkIndex(i, Character.BYTES)), x); in putChar()
491 return getShort(ix(nextGetIndex(Short.BYTES))); in getShort()
499 return getShort(ix(checkIndex(i, Short.BYTES))); in getShort()
532 putShort(ix(nextPutIndex(Short.BYTES)), x); in putShort()
544 putShort(ix(checkIndex(i, Short.BYTES)), x); in putShort()
593 return getInt(ix(nextGetIndex(Integer.BYTES))); in getInt()
601 return getInt(ix(checkIndex(i, (Integer.BYTES)))); in getInt()
[all …]
/libcore/luni/src/main/java/libcore/io/
DNioBufferIterator.java89 checkReadBounds(position, length, Integer.BYTES); in readInt()
91 position += Integer.BYTES; in readInt()
99 final int byteCount = Integer.BYTES * intCount; in readIntArray()
109 final int byteCount = Long.BYTES * longCount; in readLongArray()
118 checkReadBounds(position, length, Short.BYTES); in readShort()
120 position += Short.BYTES; in readShort()
/libcore/luni/src/test/java/libcore/libcore/io/
DMemoryTest.java34 int scale = Integer.BYTES; in testSetIntArray()
64 assertEquals(expectedValues[i], Memory.peekInt(ptr + Integer.BYTES * i, swap)); in assertIntsEqual()
75 int scale = Long.BYTES; in testSetLongArray()
105 assertEquals(expectedValues[i], Memory.peekLong(ptr + Long.BYTES * i, swap)); in assertLongsEqual()
113 int scale = Short.BYTES; in testSetShortArray()
143 assertEquals(expectedValues[i], Memory.peekShort(ptr + Short.BYTES * i, swap)); in assertShortsEqual()
/libcore/ojluni/src/main/java/java/util/zip/
DCRC32C.java233 for (; off < (end - Long.BYTES); off += Long.BYTES) { in updateBytes()
240 + Integer.BYTES); in updateBytes()
308 for (; off <= (end - Long.BYTES); off += Long.BYTES) { in updateDirectByteBuffer()
312 int secondHalf = UNSAFE.getInt(address + off + Integer.BYTES); in updateDirectByteBuffer()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DDirectDoubleBufferTest.java26 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Double.BYTES).asDoubleBuffer(); in setUp()
67 … assertEquals(doubleBufferBasePointer + Double.BYTES, NIOAccess.getBasePointer(doubleBuffer)); in testJNIAccessByAddress()
DDirectLongBufferTest.java26 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Long.BYTES).asLongBuffer(); in setUp()
68 assertEquals(longBufferBasePointer + Long.BYTES, NIOAccess.getBasePointer(longBuffer)); in testJNIAccessByAddress()
DDirectIntBufferTest.java26 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Integer.BYTES).asIntBuffer(); in setUp()
68 assertEquals(intBufferBasePointer + Integer.BYTES, NIOAccess.getBasePointer(intBuffer)); in testJNIAccessByAddress()
DDirectCharBufferTest.java27 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Character.BYTES).asCharBuffer(); in setUp()
68 assertEquals(charBufferBasePointer + Character.BYTES, NIOAccess.getBasePointer(charBuffer)); in testJNIAccessByAddress()
DDirectShortBufferTest.java26 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Short.BYTES).asShortBuffer(); in setUp()
68 assertEquals(shortBufferBasePointer + Short.BYTES, NIOAccess.getBasePointer(shortBuffer)); in testJNIAccessByAddress()
DDirectFloatBufferTest.java26 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Float.BYTES).asFloatBuffer(); in setUp()
68 assertEquals(floatBufferBasePointer + Float.BYTES, NIOAccess.getBasePointer(floatBuffer)); in testJNIAccessByAddress()
DDirectByteBufferTest.java28 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Byte.BYTES); in setUp()
/libcore/luni/src/test/java/libcore/java/lang/
DByteTest.java40 assertEquals(1, Byte.BYTES);
47 assertEquals(0, ui >>> Byte.BYTES * 8);
56 assertEquals(0, ul >>> Byte.BYTES * 8); in testToUnsignedLong()
DShortTest.java40 assertEquals(2, Short.BYTES);
47 assertEquals(0, ui >>> Short.BYTES * 8);
56 assertEquals(0, ul >>> Short.BYTES * 8); in testToUnsignedLong()
/libcore/ojluni/src/test/java/nio/Buffer/
DEqualsCompareTest.java240 return ByteBuffer.allocateDirect(length * Character.BYTES). in construct()
244 return ByteBuffer.allocate(length * Character.BYTES). in construct()
276 return ByteBuffer.allocateDirect(length * Short.BYTES). in construct()
280 return ByteBuffer.allocate(length * Short.BYTES). in construct()
306 return ByteBuffer.allocateDirect(length * Integer.BYTES). in construct()
310 return ByteBuffer.allocate(length * Integer.BYTES). in construct()
333 return ByteBuffer.allocateDirect(length * Float.BYTES). in construct()
337 return ByteBuffer.allocate(length * Float.BYTES). in construct()
377 return ByteBuffer.allocateDirect(length * Long.BYTES). in construct()
381 return ByteBuffer.allocate(length * Long.BYTES). in construct()
[all …]
DBulkPutBuffer.java99 byte.class, new TypeAttr(ByteBuffer.class, Byte.BYTES, "Byte"),
100 char.class, new TypeAttr(CharBuffer.class, Character.BYTES, "Char"),
101 short.class, new TypeAttr(ShortBuffer.class, Short.BYTES, "Short"),
102 int.class, new TypeAttr(IntBuffer.class, Integer.BYTES, "Int"),
103 float.class, new TypeAttr(FloatBuffer.class, Float.BYTES, "Float"),
104 long.class, new TypeAttr(LongBuffer.class, Long.BYTES, "Long"),
105 double.class, new TypeAttr(DoubleBuffer.class, Double.BYTES, "Double")
DBasicShort.java1235 … () -> ByteBuffer.allocate(512 * Short.BYTES).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer(), in testPutBuffer()
1236 … () -> ByteBuffer.allocate(512 * Short.BYTES).order(ByteOrder.BIG_ENDIAN).asShortBuffer(), in testPutBuffer()
1237 … () -> ByteBuffer.allocateDirect(512 * Short.BYTES).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer(), in testPutBuffer()
1238 … () -> ByteBuffer.allocateDirect(512 * Short.BYTES).order(ByteOrder.BIG_ENDIAN).asShortBuffer(), in testPutBuffer()
1239 () -> ByteBuffer.allocateDirect(512 * Short.BYTES).asShortBuffer().slice(100, 412), in testPutBuffer()
1240 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Short.BYTES) in testPutBuffer()
1242 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Short.BYTES) in testPutBuffer()
DBasicInt.java1235 … () -> ByteBuffer.allocate(512 * Integer.BYTES).order(ByteOrder.LITTLE_ENDIAN).asIntBuffer(), in testPutBuffer()
1236 … () -> ByteBuffer.allocate(512 * Integer.BYTES).order(ByteOrder.BIG_ENDIAN).asIntBuffer(), in testPutBuffer()
1237 … () -> ByteBuffer.allocateDirect(512 * Integer.BYTES).order(ByteOrder.LITTLE_ENDIAN).asIntBuffer(), in testPutBuffer()
1238 … () -> ByteBuffer.allocateDirect(512 * Integer.BYTES).order(ByteOrder.BIG_ENDIAN).asIntBuffer(), in testPutBuffer()
1239 () -> ByteBuffer.allocateDirect(512 * Integer.BYTES).asIntBuffer().slice(100, 412), in testPutBuffer()
1240 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Integer.BYTES) in testPutBuffer()
1242 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Integer.BYTES) in testPutBuffer()
DBasicLong.java1235 … () -> ByteBuffer.allocate(512 * Long.BYTES).order(ByteOrder.LITTLE_ENDIAN).asLongBuffer(), in testPutBuffer()
1236 … () -> ByteBuffer.allocate(512 * Long.BYTES).order(ByteOrder.BIG_ENDIAN).asLongBuffer(), in testPutBuffer()
1237 … () -> ByteBuffer.allocateDirect(512 * Long.BYTES).order(ByteOrder.LITTLE_ENDIAN).asLongBuffer(), in testPutBuffer()
1238 … () -> ByteBuffer.allocateDirect(512 * Long.BYTES).order(ByteOrder.BIG_ENDIAN).asLongBuffer(), in testPutBuffer()
1239 () -> ByteBuffer.allocateDirect(512 * Long.BYTES).asLongBuffer().slice(100, 412), in testPutBuffer()
1240 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Long.BYTES) in testPutBuffer()
1242 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Long.BYTES) in testPutBuffer()
DBasicDouble.java1235 … () -> ByteBuffer.allocate(512 * Double.BYTES).order(ByteOrder.LITTLE_ENDIAN).asDoubleBuffer(), in testPutBuffer()
1236 … () -> ByteBuffer.allocate(512 * Double.BYTES).order(ByteOrder.BIG_ENDIAN).asDoubleBuffer(), in testPutBuffer()
1237 …() -> ByteBuffer.allocateDirect(512 * Double.BYTES).order(ByteOrder.LITTLE_ENDIAN).asDoubleBuffer(… in testPutBuffer()
1238 … () -> ByteBuffer.allocateDirect(512 * Double.BYTES).order(ByteOrder.BIG_ENDIAN).asDoubleBuffer(), in testPutBuffer()
1239 … () -> ByteBuffer.allocateDirect(512 * Double.BYTES).asDoubleBuffer().slice(100, 412), in testPutBuffer()
1240 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Double.BYTES) in testPutBuffer()
1242 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Double.BYTES) in testPutBuffer()
DBasicFloat.java1235 … () -> ByteBuffer.allocate(512 * Float.BYTES).order(ByteOrder.LITTLE_ENDIAN).asFloatBuffer(), in testPutBuffer()
1236 … () -> ByteBuffer.allocate(512 * Float.BYTES).order(ByteOrder.BIG_ENDIAN).asFloatBuffer(), in testPutBuffer()
1237 … () -> ByteBuffer.allocateDirect(512 * Float.BYTES).order(ByteOrder.LITTLE_ENDIAN).asFloatBuffer(), in testPutBuffer()
1238 … () -> ByteBuffer.allocateDirect(512 * Float.BYTES).order(ByteOrder.BIG_ENDIAN).asFloatBuffer(), in testPutBuffer()
1239 () -> ByteBuffer.allocateDirect(512 * Float.BYTES).asFloatBuffer().slice(100, 412), in testPutBuffer()
1240 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Float.BYTES) in testPutBuffer()
1242 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Float.BYTES) in testPutBuffer()
DBasicChar.java1235 … () -> ByteBuffer.allocate(512 * Character.BYTES).order(ByteOrder.LITTLE_ENDIAN).asCharBuffer(), in testPutBuffer()
1236 … () -> ByteBuffer.allocate(512 * Character.BYTES).order(ByteOrder.BIG_ENDIAN).asCharBuffer(), in testPutBuffer()
1237 …() -> ByteBuffer.allocateDirect(512 * Character.BYTES).order(ByteOrder.LITTLE_ENDIAN).asCharBuffer… in testPutBuffer()
1238 … () -> ByteBuffer.allocateDirect(512 * Character.BYTES).order(ByteOrder.BIG_ENDIAN).asCharBuffer(), in testPutBuffer()
1239 … () -> ByteBuffer.allocateDirect(512 * Character.BYTES).asCharBuffer().slice(100, 412), in testPutBuffer()
1240 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Character.BYTES) in testPutBuffer()
1242 () -> ((ByteBuffer) ByteBuffer.allocateDirect(512 * Character.BYTES) in testPutBuffer()
/libcore/luni/src/test/java/libcore/sun/misc/
DUnsafeTest.java256 long buffer = unsafe.allocateMemory(Byte.BYTES); in test_putByte_getByte_Absolute()
266 long buffer = unsafe.allocateMemory(Integer.BYTES); in test_putInt_getInt_Absolute()
276 long buffer = unsafe.allocateMemory(Long.BYTES); in test_putLong_getLong_Absolute()
286 long buffer = unsafe.allocateMemory(Float.BYTES); in test_putFloat_getFloat_Absolute()
296 long buffer = unsafe.allocateMemory(Double.BYTES); in test_putDouble_getDouble_Absolute()
/libcore/ojluni/annotations/flagged_api/java/lang/
DDouble.annotated.java94 public static final int BYTES = 8; // 0x8 field in Double
/libcore/ojluni/annotations/sdk/nullability/java/lang/
DDouble.annotated.java93 public static final int BYTES = 8; // 0x8 field in Double
/libcore/ojluni/annotations/hiddenapi/java/lang/
DFloat.java155 public static final int BYTES = 4; // 0x4 field in Float

123