/libcore/luni/src/main/java/libcore/io/ |
D | Memory.java | 45 public static int peekInt(byte[] src, int offset, ByteOrder order) { in peekInt() argument 47 return (((src[offset++] & 0xff) << 24) | in peekInt() 48 ((src[offset++] & 0xff) << 16) | in peekInt() 49 ((src[offset++] & 0xff) << 8) | in peekInt() 50 ((src[offset ] & 0xff) << 0)); in peekInt() 52 return (((src[offset++] & 0xff) << 0) | in peekInt() 53 ((src[offset++] & 0xff) << 8) | in peekInt() 54 ((src[offset++] & 0xff) << 16) | in peekInt() 55 ((src[offset ] & 0xff) << 24)); in peekInt() 59 public static long peekLong(byte[] src, int offset, ByteOrder order) { in peekLong() argument [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/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 | 65 int offset = SIZE_POLLFD * i + EVENT_OFFSET; in getEventOps() local 66 return pollArray.getShort(offset); in getEventOps() 70 int offset = SIZE_POLLFD * i + REVENT_OFFSET; in getReventOps() local 71 return pollArray.getShort(offset); in getReventOps() 75 int offset = SIZE_POLLFD * i + FD_OFFSET; in getDescriptor() local 76 return pollArray.getInt(offset); in getDescriptor() 80 int offset = SIZE_POLLFD * i + EVENT_OFFSET; in putEventOps() local 81 pollArray.putShort(offset, (short)event); in putEventOps() 85 int offset = SIZE_POLLFD * i + REVENT_OFFSET; in putReventOps() local 86 pollArray.putShort(offset, (short)revent); in putReventOps() [all …]
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | Unsafe.java | 128 public native boolean compareAndSwapInt(Object obj, long offset, in compareAndSwapInt() argument 143 public native boolean compareAndSwapLong(Object obj, long offset, in compareAndSwapLong() argument 158 public native boolean compareAndSwapObject(Object obj, long offset, in compareAndSwapObject() argument 169 public native int getIntVolatile(Object obj, long offset); in getIntVolatile() argument 179 public native void putIntVolatile(Object obj, long offset, int newValue); in putIntVolatile() argument 189 public native long getLongVolatile(Object obj, long offset); in getLongVolatile() argument 199 public native void putLongVolatile(Object obj, long offset, long newValue); in putLongVolatile() argument 209 public native Object getObjectVolatile(Object obj, long offset); in getObjectVolatile() argument 219 public native void putObjectVolatile(Object obj, long offset, in putObjectVolatile() argument 229 public native int getInt(Object obj, long offset); in getInt() argument [all …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | DatagramPacket.java | 58 int offset; field in DatagramPacket 77 public DatagramPacket(byte buf[], int offset, int length) { in DatagramPacket() argument 78 setData(buf, offset, length); in DatagramPacket() 113 public DatagramPacket(byte buf[], int offset, int length, in DatagramPacket() argument 115 setData(buf, offset, length); in DatagramPacket() 136 public DatagramPacket(byte buf[], int offset, int length, in DatagramPacket() argument 138 setData(buf, offset, length); in DatagramPacket() 224 return offset; in getOffset() 258 public synchronized void setData(byte[] buf, int offset, int length) { in setData() argument 260 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 | ByteBufferAsShortBuffer.java | 33 protected final int offset; field in ByteBufferAsShortBuffer 53 offset = off; in ByteBufferAsShortBuffer() 61 int off = (pos << 1) + offset; in slice() 72 offset, order); in duplicate() 81 offset, order); in asReadOnlyBuffer() 85 return (i << 1) + offset; in ix() 97 public ShortBuffer get(short[] dst, int offset, int length) { in get() argument 98 checkBounds(offset, length, dst.length); in get() 101 bb.getUnchecked(ix(position), dst, offset, length); in get() local 119 public ShortBuffer put(short[] src, int offset, int length) { in put() argument [all …]
|
D | ByteBufferAsLongBuffer.java | 33 protected final int offset; field in ByteBufferAsLongBuffer 53 offset = off; in ByteBufferAsLongBuffer() 61 int off = (pos << 3) + offset; in slice() 72 offset, in duplicate() 82 offset, in asReadOnlyBuffer() 87 return (i << 3) + offset; in ix() 98 public LongBuffer get(long[] dst, int offset, int length) { in get() argument 99 checkBounds(offset, length, dst.length); in get() 102 bb.getUnchecked(ix(position), dst, offset, length); in get() local 120 public LongBuffer put(long[] src, int offset, int length) { in put() argument [all …]
|
D | ByteBufferAsDoubleBuffer.java | 34 protected final int offset; field in ByteBufferAsDoubleBuffer 54 offset = off; in ByteBufferAsDoubleBuffer() 62 int off = (pos << 3) + offset; in slice() 73 offset, in duplicate() 83 offset, in asReadOnlyBuffer() 88 return (i << 3) + offset; in ix() 99 public DoubleBuffer get(double[] 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 DoubleBuffer put(double[] src, int offset, int length) { in put() argument [all …]
|
/libcore/libart/src/main/java/java/lang/ |
D | StringFactory.java | 52 public static String newStringFromBytes(byte[] data, int offset, int byteCount) { in newStringFromBytes() argument 53 return newStringFromBytes(data, offset, byteCount, Charset.defaultCharset()); in newStringFromBytes() 56 … public static native String newStringFromBytes(byte[] data, int high, int offset, int byteCount); in newStringFromBytes() argument 58 …public static String newStringFromBytes(byte[] data, int offset, int byteCount, String charsetName… in newStringFromBytes() argument 59 return newStringFromBytes(data, offset, byteCount, Charset.forNameUEE(charsetName)); in newStringFromBytes() 67 … public static String newStringFromBytes(byte[] data, int offset, int byteCount, Charset charset) { in newStringFromBytes() argument 68 if ((offset | byteCount) < 0 || byteCount > data.length - offset) { in newStringFromBytes() 69 throw new StringIndexOutOfBoundsException(data.length, offset, byteCount); in newStringFromBytes() 81 int idx = offset; in newStringFromBytes() 82 int last = offset + byteCount; in newStringFromBytes() [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/luni/src/main/java/libcore/util/ |
D | CharsetUtils.java | 29 public static native byte[] toAsciiBytes(String s, int offset, int length); in toAsciiBytes() argument 35 public static native byte[] toIsoLatin1Bytes(String s, int offset, int length); in toIsoLatin1Bytes() argument 41 public static native byte[] toUtf8Bytes(String s, int offset, int length); in toUtf8Bytes() argument 47 public static byte[] toBigEndianUtf16Bytes(String s, int offset, int length) { in toBigEndianUtf16Bytes() argument 49 int end = offset + length; in toBigEndianUtf16Bytes() 51 for (int i = offset; i < end; ++i) { in toBigEndianUtf16Bytes() 67 public static native void asciiBytesToChars(byte[] bytes, int offset, int length, char[] chars); in asciiBytesToChars() argument 76 …public static native void isoLatin1BytesToChars(byte[] bytes, int offset, int length, char[] chars… in isoLatin1BytesToChars() argument
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StringBuilder.java | 204 public StringBuilder append(char[] str, int offset, int len) { in append() argument 205 super.append(str, offset, len); in append() 274 public StringBuilder insert(int index, char[] str, int offset, in insert() argument 277 super.insert(index, str, offset, len); in insert() 284 public StringBuilder insert(int offset, Object obj) { in insert() argument 285 return insert(offset, String.valueOf(obj)); in insert() 291 public StringBuilder insert(int offset, String str) { in insert() argument 292 super.insert(offset, str); in insert() 299 public StringBuilder insert(int offset, char[] str) { in insert() argument 300 super.insert(offset, str); in insert() [all …]
|
D | StringBuffer.java | 321 public synchronized StringBuffer append(char[] str, int offset, int len) { in append() argument 322 super.append(str, offset, len); in append() 419 public synchronized StringBuffer insert(int index, char[] str, int offset, in insert() argument 422 super.insert(index, str, offset, len); in insert() 429 public synchronized StringBuffer insert(int offset, Object obj) { in insert() argument 430 super.insert(offset, String.valueOf(obj)); in insert() 437 public synchronized StringBuffer insert(int offset, String str) { in insert() argument 438 super.insert(offset, str); in insert() 445 public synchronized StringBuffer insert(int offset, char[] str) { in insert() argument 446 super.insert(offset, str); in insert() [all …]
|
D | AbstractStringBuilder.java | 548 public AbstractStringBuilder append(char str[], int offset, int len) { in append() argument 551 System.arraycopy(str, offset, value, count, len); in append() 929 public AbstractStringBuilder insert(int index, char[] str, int offset, in insert() argument 934 if ((offset < 0) || (len < 0) || (offset > str.length - len)) in insert() 936 "offset " + offset + ", len " + len + ", str.length " in insert() 940 System.arraycopy(str, offset, value, index, len); in insert() 965 public AbstractStringBuilder insert(int offset, Object obj) { in insert() argument 966 return insert(offset, String.valueOf(obj)); in insert() 1001 public AbstractStringBuilder insert(int offset, String str) { in insert() argument 1002 if ((offset < 0) || (offset > length())) in insert() [all …]
|
/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/luni/src/main/java/java/util/concurrent/atomic/ |
D | AtomicIntegerArray.java | 88 private int getRaw(long offset) { in getRaw() argument 89 return U.getIntVolatile(array, offset); in getRaw() 139 private boolean compareAndSetRaw(long offset, int expect, int update) { in compareAndSetRaw() argument 140 return U.compareAndSwapInt(array, offset, expect, update); in compareAndSetRaw() 234 long offset = checkedByteOffset(i); in getAndUpdate() local 237 prev = getRaw(offset); in getAndUpdate() 239 } while (!compareAndSetRaw(offset, prev, next)); in getAndUpdate() 255 long offset = checkedByteOffset(i); in updateAndGet() local 258 prev = getRaw(offset); in updateAndGet() 260 } while (!compareAndSetRaw(offset, prev, next)); in updateAndGet() [all …]
|
D | AtomicLongArray.java | 87 private long getRaw(long offset) { in getRaw() argument 88 return U.getLongVolatile(array, offset); in getRaw() 138 private boolean compareAndSetRaw(long offset, long expect, long update) { in compareAndSetRaw() argument 139 return U.compareAndSwapLong(array, offset, expect, update); in compareAndSetRaw() 233 long offset = checkedByteOffset(i); in getAndUpdate() local 236 prev = getRaw(offset); in getAndUpdate() 238 } while (!compareAndSetRaw(offset, prev, next)); in getAndUpdate() 254 long offset = checkedByteOffset(i); in updateAndGet() local 257 prev = getRaw(offset); in updateAndGet() 259 } 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()
|