Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 328) sorted by relevance

12345678910>>...14

/libcore/luni/src/main/java/libcore/io/
DMemory.java50 public static int peekInt(byte[] src, int offset, ByteOrder order) { in peekInt() argument
52 return (((src[offset++] & 0xff) << 24) | in peekInt()
53 ((src[offset++] & 0xff) << 16) | in peekInt()
54 ((src[offset++] & 0xff) << 8) | in peekInt()
55 ((src[offset ] & 0xff) << 0)); in peekInt()
57 return (((src[offset++] & 0xff) << 0) | in peekInt()
58 ((src[offset++] & 0xff) << 8) | in peekInt()
59 ((src[offset++] & 0xff) << 16) | in peekInt()
60 ((src[offset ] & 0xff) << 24)); in peekInt()
64 public static long peekLong(byte[] src, int offset, ByteOrder order) { in peekLong() argument
[all …]
/libcore/ojluni/src/main/java/sun/nio/ch/
DNativeObject.java66 NativeObject(long address, long offset) { in NativeObject() argument
68 this.address = address + offset; in NativeObject()
108 NativeObject subObject(int offset) { in subObject() argument
109 return new NativeObject(offset + address); in subObject()
123 NativeObject getObject(int offset) { in getObject() argument
127 newAddress = unsafe.getLong(offset + address); in getObject()
130 newAddress = unsafe.getInt(offset + address) & 0x00000000FFFFFFFF; in getObject()
150 void putObject(int offset, NativeObject ob) { in putObject() argument
153 putLong(offset, ob.address); in putObject()
156 putInt(offset, (int)(ob.address & 0x00000000FFFFFFFF)); in putObject()
[all …]
DAbstractPollArrayWrapper.java57 int offset = SIZE_POLLFD * i + EVENT_OFFSET; in getEventOps() local
58 return pollArray.getShort(offset); in getEventOps()
62 int offset = SIZE_POLLFD * i + REVENT_OFFSET; in getReventOps() local
63 return pollArray.getShort(offset); in getReventOps()
67 int offset = SIZE_POLLFD * i + FD_OFFSET; in getDescriptor() local
68 return pollArray.getInt(offset); in getDescriptor()
72 int offset = SIZE_POLLFD * i + EVENT_OFFSET; in putEventOps() local
73 pollArray.putShort(offset, (short)event); in putEventOps()
77 int offset = SIZE_POLLFD * i + REVENT_OFFSET; in putReventOps() local
78 pollArray.putShort(offset, (short)revent); in putReventOps()
[all …]
/libcore/ojluni/src/main/java/sun/misc/
DUnsafe.java134 public native boolean compareAndSwapInt(Object obj, long offset, in compareAndSwapInt() argument
150 public native boolean compareAndSwapLong(Object obj, long offset, in compareAndSwapLong() argument
166 public native boolean compareAndSwapObject(Object obj, long offset, in compareAndSwapObject() argument
178 public native int getIntVolatile(Object obj, long offset); in getIntVolatile() argument
189 public native void putIntVolatile(Object obj, long offset, int newValue); in putIntVolatile() argument
200 public native long getLongVolatile(Object obj, long offset); in getLongVolatile() argument
211 public native void putLongVolatile(Object obj, long offset, long newValue); in putLongVolatile() argument
222 public native Object getObjectVolatile(Object obj, long offset); in getObjectVolatile() argument
233 public native void putObjectVolatile(Object obj, long offset, in putObjectVolatile() argument
244 public native int getInt(Object obj, long offset); in getInt() argument
[all …]
/libcore/ojluni/src/main/java/java/time/
DOffsetTime.java144 private final ZoneOffset offset; field in OffsetTime
206 public static OffsetTime of(LocalTime time, ZoneOffset offset) { in of() argument
207 return new OffsetTime(time, offset); in of()
229 …ublic static OffsetTime of(int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset) { in of() argument
230 return new OffsetTime(LocalTime.of(hour, minute, second, nanoOfSecond), offset); in of()
253 ZoneOffset offset = rules.getOffset(instant); in ofInstant() local
254 … long localSecond = instant.getEpochSecond() + offset.getTotalSeconds(); // overflow caught later in ofInstant()
257 return new OffsetTime(time, offset); in ofInstant()
286 ZoneOffset offset = ZoneOffset.from(temporal); in from() local
287 return new OffsetTime(time, offset); in from()
[all …]
DOffsetDateTime.java190 private final ZoneOffset offset; field in OffsetDateTime
255 public static OffsetDateTime of(LocalDate date, LocalTime time, ZoneOffset offset) { in of() argument
257 return new OffsetDateTime(dt, offset); in of()
269 public static OffsetDateTime of(LocalDateTime dateTime, ZoneOffset offset) { in of() argument
270 return new OffsetDateTime(dateTime, offset); in of()
299 int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset) { in of() argument
301 return new OffsetDateTime(dt, offset); in of()
321 ZoneOffset offset = rules.getOffset(instant); in ofInstant() local
322 …calDateTime ldt = LocalDateTime.ofEpochSecond(instant.getEpochSecond(), instant.getNano(), offset); in ofInstant()
323 return new OffsetDateTime(ldt, offset); in ofInstant()
[all …]
DZonedDateTime.java173 private final ZoneOffset offset; field in ZonedDateTime
368 ZoneOffset offset; in ofLocal() local
370 offset = validOffsets.get(0); in ofLocal()
374 offset = trans.getOffsetAfter(); in ofLocal()
377 offset = preferredOffset; in ofLocal()
379offset = Objects.requireNonNull(validOffsets.get(0), "offset"); // protect against bad ZoneRules in ofLocal()
382 return new ZonedDateTime(localDateTime, offset, zone); in ofLocal()
426 …public static ZonedDateTime ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)… in ofInstant() argument
428 Objects.requireNonNull(offset, "offset"); in ofInstant()
430 if (zone.getRules().isValidOffset(localDateTime, offset)) { in ofInstant()
[all …]
/libcore/ojluni/annotations/hiddenapi/sun/misc/
DUnsafe.java67 java.lang.Object obj, long offset, int expectedValue, int newValue); in compareAndSwapInt() argument
71 java.lang.Object obj, long offset, long expectedValue, long newValue); in compareAndSwapLong() argument
76 long offset, in compareAndSwapObject() argument
81 public native int getIntVolatile(java.lang.Object obj, long offset); in getIntVolatile() argument
84 public native void putIntVolatile(java.lang.Object obj, long offset, int newValue); in putIntVolatile() argument
87 public native long getLongVolatile(java.lang.Object obj, long offset); in getLongVolatile() argument
90 public native void putLongVolatile(java.lang.Object obj, long offset, long newValue); in putLongVolatile() argument
93 public native java.lang.Object getObjectVolatile(java.lang.Object obj, long offset); in getObjectVolatile() argument
97 java.lang.Object obj, long offset, java.lang.Object newValue); in putObjectVolatile() argument
100 public native int getInt(java.lang.Object obj, long offset); in getInt() argument
[all …]
/libcore/ojluni/src/main/java/java/net/
DDatagramPacket.java68 int offset; field in DatagramPacket
87 public DatagramPacket(byte buf[], int offset, int length) { in DatagramPacket() argument
88 setData(buf, offset, length); in DatagramPacket()
123 public DatagramPacket(byte buf[], int offset, int length, in DatagramPacket() argument
125 setData(buf, offset, length); in DatagramPacket()
152 public DatagramPacket(byte buf[], int offset, int length, SocketAddress address) { in DatagramPacket() argument
153 setData(buf, offset, length); in DatagramPacket()
244 return offset; in getOffset()
278 public synchronized void setData(byte[] buf, int offset, int length) { in setData() argument
280 if (length < 0 || offset < 0 || in setData()
[all …]
/libcore/ojluni/src/main/java/java/nio/
DMappedByteBuffer.java90 MappedByteBuffer(int mark, int pos, int lim, int cap, byte[] buf, int offset) { in MappedByteBuffer() argument
91 super(mark, pos, lim, cap, buf, offset); in MappedByteBuffer()
110 long offset = address % ps; in mappingOffset() local
111 return (offset >= 0) ? offset : (ps + offset); in mappingOffset()
144 long offset = mappingOffset(); in isLoaded() local
145 long length = mappingLength(offset); in isLoaded()
146 return isLoaded0(mappingAddress(offset), length, Bits.pageCount(length)); in isLoaded()
166 long offset = mappingOffset(); in load() local
167 long length = mappingLength(offset); in load()
168 load0(mappingAddress(offset), length); in load()
[all …]
DStringCharBuffer.java50 offset + this.position()); in slice()
58 int offset) { in StringCharBuffer() argument
59 super(mark, pos, limit, cap, null, offset); in StringCharBuffer()
65 position(), limit(), capacity(), offset); in duplicate()
73 return str.charAt(nextGetIndex() + offset); in get()
77 return str.charAt(checkIndex(index) + offset); in get()
81 return str.charAt(index + offset); in getUnchecked()
103 return str.toString().substring(start + offset, end + offset); in toString()
114 offset); in subSequence()
/libcore/libart/src/main/java/java/lang/
DStringFactory.java53 public static String newStringFromBytes(byte[] data, int offset, int byteCount) { in newStringFromBytes() argument
54 return newStringFromBytes(data, offset, byteCount, Charset.defaultCharset()); in newStringFromBytes()
58 … public static native String newStringFromBytes(byte[] data, int high, int offset, int byteCount); in newStringFromBytes() argument
60 …public static String newStringFromBytes(byte[] data, int offset, int byteCount, String charsetName… in newStringFromBytes() argument
61 return newStringFromBytes(data, offset, byteCount, Charset.forNameUEE(charsetName)); in newStringFromBytes()
77 … public static String newStringFromBytes(byte[] data, int offset, int byteCount, Charset charset) { in newStringFromBytes() argument
78 if ((offset | byteCount) < 0 || byteCount > data.length - offset) { in newStringFromBytes()
79 throw new StringIndexOutOfBoundsException(data.length, offset, byteCount); in newStringFromBytes()
127 int idx = offset; in newStringFromBytes()
128 int last = offset + byteCount; in newStringFromBytes()
[all …]
/libcore/ojluni/src/main/java/java/lang/
DStringBuilder.java190 public StringBuilder append(char[] str, int offset, int len) { in append() argument
191 super.append(str, offset, len); in append()
271 public StringBuilder insert(int index, char[] str, int offset, in insert() argument
274 super.insert(index, str, offset, len); in insert()
282 public StringBuilder insert(int offset, Object obj) { in insert() argument
283 super.insert(offset, obj); in insert()
291 public StringBuilder insert(int offset, String str) { in insert() argument
292 super.insert(offset, str); in insert()
300 public StringBuilder insert(int offset, char[] str) { in insert() argument
301 super.insert(offset, str); in insert()
[all …]
DAbstractStringBuilder.java594 public AbstractStringBuilder append(char str[], int offset, int len) { in append() argument
597 System.arraycopy(str, offset, value, count, len); in append()
960 public AbstractStringBuilder insert(int index, char[] str, int offset, in insert() argument
965 if ((offset < 0) || (len < 0) || (offset > str.length - len)) in insert()
967 "offset " + offset + ", len " + len + ", str.length " in insert()
971 System.arraycopy(str, offset, value, index, len); in insert()
995 public AbstractStringBuilder insert(int offset, Object obj) { in insert() argument
996 return insert(offset, String.valueOf(obj)); in insert()
1030 public AbstractStringBuilder insert(int offset, String str) { in insert() argument
1031 if ((offset < 0) || (offset > length())) in insert()
[all …]
/libcore/ojluni/src/main/java/java/text/
DIcuIteratorWrapper.java320 protected static final void checkOffset(int offset, CharacterIterator text) { in checkOffset() argument
321 if (offset < text.getBeginIndex() || offset > text.getEndIndex()) { in checkOffset()
333 public int following(int offset) { in following() argument
335 checkOffset(offset, text); in following()
336 return wrapped.following(offset); in following()
346 public int preceding(int offset) { in preceding() argument
351 checkOffset(offset, text); in preceding()
352 return wrapped.preceding(offset); in preceding()
363 public boolean isBoundary(int offset) { in isBoundary() argument
365 checkOffset(offset, text); in isBoundary()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
DCharacterDataImpl.java46 public void deleteData(int offset, int count) throws DOMException { in deleteData() argument
47 buffer.delete(offset, offset + count); in deleteData()
70 public void insertData(int offset, String arg) throws DOMException { in insertData() argument
72 buffer.insert(offset, arg); in insertData()
78 public void replaceData(int offset, int count, String arg) in replaceData() argument
81 buffer.replace(offset, offset + count, arg); in replaceData()
91 public String substringData(int offset, int count) throws DOMException { in substringData() argument
93 return buffer.substring(offset, offset + count); in substringData()
/libcore/ojluni/annotations/mmodule/sun/misc/
DUnsafe.annotated.java58 public native boolean getBoolean(Object obj, long offset); in getBoolean() argument
64 public native byte getByte(Object obj, long offset); in getByte() argument
67 public native double getDouble(Object obj, long offset); in getDouble() argument
70 public native float getFloat(Object obj, long offset); in getFloat() argument
76 public native int getInt(Object obj, long offset); in getInt() argument
82 public native long getLong(Object obj, long offset); in getLong() argument
85 public native Object getObject(Object obj, long offset); in getObject() argument
93 public native void putBoolean(Object obj, long offset, boolean newValue); in putBoolean() argument
99 public native void putByte(Object obj, long offset, byte newValue); in putByte() argument
102 public native void putDouble(Object obj, long offset, double newValue); in putDouble() argument
[all …]
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoZonedDateTimeImpl.java119 private final transient ZoneOffset offset; field in ChronoZonedDateTimeImpl
144 ZoneOffset offset; in ofBest() local
146 offset = validOffsets.get(0); in ofBest()
150 offset = trans.getOffsetAfter(); in ofBest()
153 offset = preferredOffset; in ofBest()
155 offset = validOffsets.get(0); in ofBest()
158 Objects.requireNonNull(offset, "offset"); // protect against bad ZoneRules in ofBest()
159 return new ChronoZonedDateTimeImpl<>(localDateTime, offset, zone); in ofBest()
172 ZoneOffset offset = rules.getOffset(instant); in ofInstant() local
173 Objects.requireNonNull(offset, "offset"); // protect against bad ZoneRules in ofInstant()
[all …]
/libcore/ojluni/src/main/java/javax/crypto/spec/
DDESedeKeySpec.java83 public DESedeKeySpec(byte[] key, int offset) throws InvalidKeyException { in DESedeKeySpec() argument
84 if (key.length - offset < 24) { in DESedeKeySpec()
88 System.arraycopy(key, offset, this.key, 0, 24); in DESedeKeySpec()
114 public static boolean isParityAdjusted(byte[] key, int offset) in isParityAdjusted() argument
116 if (key.length - offset < 24) { in isParityAdjusted()
119 if (DESKeySpec.isParityAdjusted(key, offset) == false in isParityAdjusted()
120 || DESKeySpec.isParityAdjusted(key, offset + 8) == false in isParityAdjusted()
121 || DESKeySpec.isParityAdjusted(key, offset + 16) == false) { in isParityAdjusted()
DDESKeySpec.java153 public DESKeySpec(byte[] key, int offset) throws InvalidKeyException { in DESKeySpec() argument
154 if (key.length - offset < DES_KEY_LEN) { in DESKeySpec()
158 System.arraycopy(key, offset, this.key, 0, DES_KEY_LEN); in DESKeySpec()
186 public static boolean isParityAdjusted(byte[] key, int offset) in isParityAdjusted() argument
191 if (key.length - offset < DES_KEY_LEN) { in isParityAdjusted()
196 int k = Integer.bitCount(key[offset++] & 0xff); in isParityAdjusted()
219 public static boolean isWeak(byte[] key, int offset) in isWeak() argument
224 if (key.length - offset < DES_KEY_LEN) { in isWeak()
230 if (WEAK_KEYS[i][j] != key[j+offset]) { in isWeak()
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/
DAtomicIntegerArray.java117 private int getRaw(long offset) { in getRaw() argument
118 return U.getIntVolatile(array, offset); in getRaw()
168 private boolean compareAndSetRaw(long offset, int expect, int update) { in compareAndSetRaw() argument
169 return U.compareAndSwapInt(array, offset, expect, update); in compareAndSetRaw()
263 long offset = checkedByteOffset(i); in getAndUpdate() local
266 prev = getRaw(offset); in getAndUpdate()
268 } while (!compareAndSetRaw(offset, prev, next)); in getAndUpdate()
284 long offset = checkedByteOffset(i); in updateAndGet() local
287 prev = getRaw(offset); in updateAndGet()
289 } while (!compareAndSetRaw(offset, prev, next)); in updateAndGet()
[all …]
DAtomicLongArray.java116 private long getRaw(long offset) { in getRaw() argument
117 return U.getLongVolatile(array, offset); in getRaw()
167 private boolean compareAndSetRaw(long offset, long expect, long update) { in compareAndSetRaw() argument
168 return U.compareAndSwapLong(array, offset, expect, update); in compareAndSetRaw()
262 long offset = checkedByteOffset(i); in getAndUpdate() local
265 prev = getRaw(offset); in getAndUpdate()
267 } while (!compareAndSetRaw(offset, prev, next)); in getAndUpdate()
283 long offset = checkedByteOffset(i); in updateAndGet() local
286 prev = getRaw(offset); in updateAndGet()
288 } while (!compareAndSetRaw(offset, prev, next)); in updateAndGet()
[all …]
/libcore/luni/src/main/java/libcore/util/
DCharsetUtils.java32 public static native byte[] toAsciiBytes(String s, int offset, int length); in toAsciiBytes() argument
39 public static native byte[] toIsoLatin1Bytes(String s, int offset, int length); in toIsoLatin1Bytes() argument
46 public static native byte[] toUtf8Bytes(String s, int offset, int length); in toUtf8Bytes() argument
52 public static byte[] toBigEndianUtf16Bytes(String s, int offset, int length) { in toBigEndianUtf16Bytes() argument
54 int end = offset + length; in toBigEndianUtf16Bytes()
56 for (int i = offset; i < end; ++i) { in toBigEndianUtf16Bytes()
73 public static native void asciiBytesToChars(byte[] bytes, int offset, int length, char[] chars); in asciiBytesToChars() argument
83 …public static native void isoLatin1BytesToChars(byte[] bytes, int offset, int length, char[] chars… in isoLatin1BytesToChars() argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DWriterTest.java104 private int offset; field in WriterTest.MockWriter
109 offset = 0; in MockWriter()
121 public void write(char[] buffer, int offset, int count) in write() argument
126 if (offset < 0 || count < 0 || offset >= buffer.length) { in write()
129 count = Math.min(count, buffer.length - offset); in write()
130 count = Math.min(count, this.length - this.offset); in write()
132 contents[this.offset + i] = buffer[offset + i]; in write()
134 this.offset += count; in write()
139 char[] result = new char[offset]; in getContents()
140 for (int i = 0; i < offset; i++) { in getContents()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKClock_Offset.java87 Clock test = Clock.offset(Clock.fixed(INSTANT, PARIS), OFFSET); in test_offset_ClockDuration()
96 Clock test = Clock.offset(underlying, Duration.ZERO); in test_offset_ClockDuration_zeroDuration()
102 Clock.offset(null, Duration.ZERO); in test_offset_ClockDuration_nullClock()
107 Clock.offset(Clock.systemUTC(), null); in test_offset_ClockDuration_nullDuration()
112 Clock test = Clock.offset(Clock.system(PARIS), OFFSET); in test_withZone()
119 Clock test = Clock.offset(Clock.system(PARIS), OFFSET); in test_withZone_equal()
126 Clock.offset(Clock.system(PARIS), OFFSET).withZone(null); in test_withZone_null()
131 Clock a = Clock.offset(Clock.system(PARIS), OFFSET); in test_equals()
132 Clock b = Clock.offset(Clock.system(PARIS), OFFSET); in test_equals()
138 Clock c = Clock.offset(Clock.system(MOSCOW), OFFSET); in test_equals()
[all …]

12345678910>>...14