Home
last modified time | relevance | path

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

123

/libcore/ojluni/src/main/java/java/nio/
DDirectByteBuffer.java367 int newPosition = position + Character.BYTES; in getChar()
381 checkIndex(i, Character.BYTES); in getChar()
415 putChar(ix(nextPutIndex(Character.BYTES)), x); in putChar()
427 putChar(ix(checkIndex(i, Character.BYTES)), x); in putChar()
476 return getShort(ix(nextGetIndex(Short.BYTES))); in getShort()
484 return getShort(ix(checkIndex(i, Short.BYTES))); in getShort()
517 putShort(ix(nextPutIndex(Short.BYTES)), x); in putShort()
529 putShort(ix(checkIndex(i, Short.BYTES)), x); in putShort()
578 return getInt(ix(nextGetIndex(Integer.BYTES))); in getInt()
586 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/
DDirectIntBufferTest.java26 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Integer.BYTES).asIntBuffer(); in setUp()
68 assertEquals(intBufferBasePointer + Integer.BYTES, NIOAccess.getBasePointer(intBuffer)); in testJNIAccessByAddress()
DDirectLongBufferTest.java26 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Long.BYTES).asLongBuffer(); in setUp()
68 assertEquals(longBufferBasePointer + Long.BYTES, NIOAccess.getBasePointer(longBuffer)); in testJNIAccessByAddress()
DDirectDoubleBufferTest.java26 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Double.BYTES).asDoubleBuffer(); in setUp()
67 … assertEquals(doubleBufferBasePointer + Double.BYTES, NIOAccess.getBasePointer(doubleBuffer)); in testJNIAccessByAddress()
DDirectShortBufferTest.java26 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Short.BYTES).asShortBuffer(); in setUp()
68 assertEquals(shortBufferBasePointer + Short.BYTES, NIOAccess.getBasePointer(shortBuffer)); in testJNIAccessByAddress()
DDirectCharBufferTest.java27 buf = ByteBuffer.allocateDirect(BUFFER_LENGTH*Character.BYTES).asCharBuffer(); in setUp()
68 assertEquals(charBufferBasePointer + Character.BYTES, NIOAccess.getBasePointer(charBuffer)); 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.java238 return ByteBuffer.allocateDirect(length * Character.BYTES). in construct()
242 return ByteBuffer.allocate(length * Character.BYTES). in construct()
274 return ByteBuffer.allocateDirect(length * Short.BYTES). in construct()
278 return ByteBuffer.allocate(length * Short.BYTES). in construct()
304 return ByteBuffer.allocateDirect(length * Integer.BYTES). in construct()
308 return ByteBuffer.allocate(length * Integer.BYTES). in construct()
331 return ByteBuffer.allocateDirect(length * Float.BYTES). in construct()
335 return ByteBuffer.allocate(length * Float.BYTES). in construct()
375 return ByteBuffer.allocateDirect(length * Long.BYTES). in construct()
379 return ByteBuffer.allocate(length * Long.BYTES). in construct()
[all …]
/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/hiddenapi/java/lang/
DShort.java134 public static final int BYTES = 2; // 0x2 field in Short
DFloat.java155 public static final int BYTES = 4; // 0x4 field in Float
DDouble.java152 public static final int BYTES = 8; // 0x8 field in Double
DByte.java135 public static final int BYTES = 1; // 0x1 field in Byte
/libcore/ojluni/annotations/sdk/nullability/java/lang/
DDouble.annotated.java93 public static final int BYTES = 8; // 0x8 field in Double
DFloat.annotated.java95 public static final int BYTES = 4; // 0x4 field in Float
DByte.annotated.java79 public static final int BYTES = 1; // 0x1 field in Byte
/libcore/ojluni/src/main/java/java/lang/
DShort.java567 public static final int BYTES = SIZE / Byte.SIZE; field in Short
DByte.java607 public static final int BYTES = SIZE / Byte.SIZE; field in Byte
DFloat.java157 public static final int BYTES = SIZE / Byte.SIZE; field in Float

123