/libcore/luni/src/main/java/libcore/io/ |
D | Memory.java | 46 public static int peekInt(byte[] src, int offset, ByteOrder order) { in peekInt() argument 48 return (((src[offset++] & 0xff) << 24) | in peekInt() 49 ((src[offset++] & 0xff) << 16) | in peekInt() 50 ((src[offset++] & 0xff) << 8) | in peekInt() 51 ((src[offset ] & 0xff) << 0)); in peekInt() 53 return (((src[offset++] & 0xff) << 0) | in peekInt() 54 ((src[offset++] & 0xff) << 8) | in peekInt() 55 ((src[offset++] & 0xff) << 16) | in peekInt() 56 ((src[offset ] & 0xff) << 24)); in peekInt() 60 public static long peekLong(byte[] src, int offset, ByteOrder order) { in peekLong() argument [all …]
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | NativeObject.java | 66 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 …]
|
D | AbstractPollArrayWrapper.java | 54 int offset = SIZE_POLLFD * i + EVENT_OFFSET; in getEventOps() local 55 return pollArray.getShort(offset); in getEventOps() 59 int offset = SIZE_POLLFD * i + REVENT_OFFSET; in getReventOps() local 60 return pollArray.getShort(offset); in getReventOps() 64 int offset = SIZE_POLLFD * i + FD_OFFSET; in getDescriptor() local 65 return pollArray.getInt(offset); in getDescriptor() 69 int offset = SIZE_POLLFD * i + EVENT_OFFSET; in putEventOps() local 70 pollArray.putShort(offset, (short)event); in putEventOps() 74 int offset = SIZE_POLLFD * i + REVENT_OFFSET; in putReventOps() local 75 pollArray.putShort(offset, (short)revent); in putReventOps() [all …]
|
/libcore/luni/src/main/java/java/nio/charset/ |
D | ModifiedUtf8.java | 67 public static void encode(byte[] dst, int offset, String s) { in encode() argument 73 dst[offset++] = (byte) 0xc0; in encode() 74 dst[offset++] = (byte) 0x80; in encode() 76 dst[offset++] = (byte) c; in encode() 79 dst[offset++] = (byte) ((c >>> 6) | 0xc0); in encode() 80 dst[offset++] = (byte) ((c & 0x3f) | 0x80); in encode() 82 dst[offset++] = (byte) ((c >>> 12) | 0xe0); in encode() 83 dst[offset++] = (byte) (((c >>> 6) & 0x3f) | 0x80); in encode() 84 dst[offset++] = (byte) ((c & 0x3f) | 0x80); in encode() 118 public static String decode(byte[] in, char[] out, int offset, int length) in decode() argument [all …]
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | Unsafe.java | 132 public native boolean compareAndSwapInt(Object obj, long offset, in compareAndSwapInt() argument 148 public native boolean compareAndSwapLong(Object obj, long offset, in compareAndSwapLong() argument 164 public native boolean compareAndSwapObject(Object obj, long offset, in compareAndSwapObject() argument 176 public native int getIntVolatile(Object obj, long offset); in getIntVolatile() argument 187 public native void putIntVolatile(Object obj, long offset, int newValue); in putIntVolatile() argument 198 public native long getLongVolatile(Object obj, long offset); in getLongVolatile() argument 209 public native void putLongVolatile(Object obj, long offset, long newValue); in putLongVolatile() argument 220 public native Object getObjectVolatile(Object obj, long offset); in getObjectVolatile() argument 231 public native void putObjectVolatile(Object obj, long offset, in putObjectVolatile() argument 242 public native int getInt(Object obj, long offset); in getInt() argument [all …]
|
/libcore/ojluni/src/main/java/java/time/ |
D | OffsetTime.java | 144 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 …]
|
D | OffsetDateTime.java | 190 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 …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | DatagramPacket.java | 59 int offset; field in DatagramPacket 78 public DatagramPacket(byte buf[], int offset, int length) { in DatagramPacket() argument 79 setData(buf, offset, length); in DatagramPacket() 114 public DatagramPacket(byte buf[], int offset, int length, in DatagramPacket() argument 116 setData(buf, offset, length); in DatagramPacket() 143 public DatagramPacket(byte buf[], int offset, int length, SocketAddress address) { in DatagramPacket() argument 144 setData(buf, offset, length); in DatagramPacket() 235 return offset; in getOffset() 269 public synchronized void setData(byte[] buf, int offset, int length) { in setData() argument 271 if (length < 0 || offset < 0 || in setData() [all …]
|
/libcore/ojluni/src/main/java/java/nio/ |
D | MappedByteBuffer.java | 87 MappedByteBuffer(int mark, int pos, int lim, int cap, byte[] buf, int offset) { in MappedByteBuffer() argument 88 super(mark, pos, lim, cap, buf, offset); in MappedByteBuffer() 107 long offset = address % ps; in mappingOffset() local 108 return (offset >= 0) ? offset : (ps + offset); in mappingOffset() 141 long offset = mappingOffset(); in isLoaded() local 142 long length = mappingLength(offset); in isLoaded() 143 return isLoaded0(mappingAddress(offset), length, Bits.pageCount(length)); in isLoaded() 163 long offset = mappingOffset(); in load() local 164 long length = mappingLength(offset); in load() 165 load0(mappingAddress(offset), length); in load() [all …]
|
D | StringCharBuffer.java | 49 offset + this.position()); in slice() 57 int offset) { in StringCharBuffer() argument 58 super(mark, pos, limit, cap, null, offset); in StringCharBuffer() 64 position(), limit(), capacity(), offset); in duplicate() 72 return str.charAt(nextGetIndex() + offset); in get() 76 return str.charAt(checkIndex(index) + offset); in get() 80 return str.charAt(index + offset); in getUnchecked() 102 return str.toString().substring(start + offset, end + offset); in toString() 113 offset); in subSequence()
|
D | ByteBufferAsFloatBuffer.java | 33 protected final int offset; field in ByteBufferAsFloatBuffer 54 offset = off; in ByteBufferAsFloatBuffer() 62 int off = (pos << 2) + offset; in slice() 73 offset, in duplicate() 83 offset, in asReadOnlyBuffer() 88 return (i << 2) + offset; in ix() 99 public FloatBuffer get(float[] dst, int offset, int length) { in get() argument 100 checkBounds(offset, length, dst.length); in get() 103 bb.getUnchecked(ix(position), dst, offset, length); in get() local 121 public FloatBuffer put(float[] src, int offset, int length) { in put() argument [all …]
|
/libcore/libart/src/main/java/java/lang/ |
D | StringFactory.java | 53 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() 69 … public static String newStringFromBytes(byte[] data, int offset, int byteCount, Charset charset) { in newStringFromBytes() argument 70 if ((offset | byteCount) < 0 || byteCount > data.length - offset) { in newStringFromBytes() 71 throw new StringIndexOutOfBoundsException(data.length, offset, byteCount); in newStringFromBytes() 83 int idx = offset; in newStringFromBytes() 84 int last = offset + byteCount; in newStringFromBytes() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StringBuilder.java | 190 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 …]
|
D | AbstractStringBuilder.java | 603 public AbstractStringBuilder append(char str[], int offset, int len) { in append() argument 606 System.arraycopy(str, offset, value, count, len); in append() 980 public AbstractStringBuilder insert(int index, char[] str, int offset, in insert() argument 985 if ((offset < 0) || (len < 0) || (offset > str.length - len)) in insert() 987 "offset " + offset + ", len " + len + ", str.length " in insert() 991 System.arraycopy(str, offset, value, index, len); in insert() 1016 public AbstractStringBuilder insert(int offset, Object obj) { in insert() argument 1017 return insert(offset, String.valueOf(obj)); in insert() 1052 public AbstractStringBuilder insert(int offset, String str) { in insert() argument 1053 if ((offset < 0) || (offset > length())) in insert() [all …]
|
/libcore/ojluni/src/main/java/java/text/ |
D | IcuIteratorWrapper.java | 320 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/ |
D | CharacterDataImpl.java | 46 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/src/main/java/javax/crypto/spec/ |
D | DESedeKeySpec.java | 83 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()
|
D | DESKeySpec.java | 153 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/time/chrono/ |
D | ChronoZonedDateTimeImpl.java | 119 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/luni/src/main/java/libcore/util/ |
D | CharsetUtils.java | 32 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/ |
D | WriterTest.java | 104 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/main/java/java/util/concurrent/atomic/ |
D | AtomicLongArray.java | 116 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 …]
|
D | AtomicIntegerArray.java | 117 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 …]
|
/libcore/support/src/test/java/tests/support/ |
D | Support_StringWriter.java | 113 public void write(char[] buf, int offset, int count) { in write() argument 115 if (0 <= offset && offset <= buf.length && 0 <= count in write() 116 && count <= buf.length - offset) { in write() 118 this.buf.append(buf, offset, count); in write() 172 public void write(String str, int offset, int count) { in write() argument 173 String sub = str.substring(offset, offset + count); in write()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/support/ |
D | BrokenInputStream.java | 31 private int offset; field in BrokenInputStream 33 public BrokenInputStream(InputStream stream, int offset) { in BrokenInputStream() argument 37 this.offset = offset; in BrokenInputStream() 42 if (offset == 0) { in read() 46 offset--; in read()
|