Home
last modified time | relevance | path

Searched refs:dst (Results 1 – 25 of 99) sorted by relevance

1234

/libcore/luni/src/main/java/libcore/io/
DMemory.java36 public static native void unsafeBulkGet(Object dst, int dstOffset, int byteCount, in unsafeBulkGet() argument
43 public static native void unsafeBulkPut(byte[] dst, int dstOffset, int byteCount, in unsafeBulkPut() argument
92 public static void pokeInt(byte[] dst, int offset, int value, ByteOrder order) { in pokeInt() argument
94 dst[offset++] = (byte) ((value >> 24) & 0xff); in pokeInt()
95 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt()
96 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt()
97 dst[offset ] = (byte) ((value >> 0) & 0xff); in pokeInt()
99 dst[offset++] = (byte) ((value >> 0) & 0xff); in pokeInt()
100 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt()
101 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt()
[all …]
DStreams.java59 public static void readFully(InputStream in, byte[] dst) throws IOException { in readFully() argument
60 readFully(in, dst, 0, dst.length); in readFully()
69 …public static void readFully(InputStream in, byte[] dst, int offset, int byteCount) throws IOExcep… in readFully() argument
76 if (dst == null) { in readFully()
79 Arrays.checkOffsetAndCount(dst.length, offset, byteCount); in readFully()
81 int bytesRead = in.read(dst, offset, byteCount); in readFully()
DNioBufferIterator.java66 public void readByteArray(byte[] dst, int dstOffset, int byteCount) { in readByteArray() argument
67 checkDstBounds(dstOffset, dst.length, byteCount); in readByteArray()
70 Memory.peekByteArray(address + position, dst, dstOffset, byteCount); in readByteArray()
90 public void readIntArray(int[] dst, int dstOffset, int intCount) { in readIntArray() argument
91 checkDstBounds(dstOffset, dst.length, intCount); in readIntArray()
95 Memory.peekIntArray(address + position, dst, dstOffset, intCount, swap); in readIntArray()
/libcore/benchmarks/src/benchmarks/
DSystemArrayCopyBenchmark.java31 char[] dst = new char[len]; in timeSystemCharArrayCopy() local
33 System.arraycopy(src, 0, dst, 0, len); in timeSystemCharArrayCopy()
40 byte[] dst = new byte[len]; in timeSystemByteArrayCopy()
42 System.arraycopy(src, 0, dst, 0, len); in timeSystemByteArrayCopy()
49 short[] dst = new short[len]; in timeSystemShortArrayCopy() local
51 System.arraycopy(src, 0, dst, 0, len); in timeSystemShortArrayCopy()
58 int[] dst = new int[len]; in timeSystemIntArrayCopy() local
60 System.arraycopy(src, 0, dst, 0, len); in timeSystemIntArrayCopy()
67 long[] dst = new long[len]; in timeSystemLongArrayCopy() local
69 System.arraycopy(src, 0, dst, 0, len); in timeSystemLongArrayCopy()
[all …]
DArrayCopyBenchmark.java25 char[] dst = new char[8192]; in timeManualArrayCopy() local
27 dst[i] = src[i]; in timeManualArrayCopy()
35 char[] dst = new char[8192]; in time_System_arrayCopy() local
36 System.arraycopy(src, 0, dst, 0, 8192); in time_System_arrayCopy()
43 char[] dst = Arrays.copyOf(src, 8192); in time_Arrays_copyOf() local
50 char[] dst = Arrays.copyOfRange(src, 0, 8192); in time_Arrays_copyOfRange() local
/libcore/ojluni/src/main/java/java/lang/
DSystem.java459 private static void arraycopy(char[] src, int srcPos, char[] dst, int dstPos, int length) { in arraycopy() argument
463 if (dst == null) { in arraycopy()
467 srcPos > src.length - length || dstPos > dst.length - length) { in arraycopy()
470 " dst.length=" + dst.length + " dstPos=" + dstPos + " length=" + length); in arraycopy()
474 if (src == dst && srcPos < dstPos && dstPos < srcPos + length) { in arraycopy()
479 dst[dstPos + i] = src[srcPos + i]; in arraycopy()
484 dst[dstPos + i] = src[srcPos + i]; in arraycopy()
489 arraycopyCharUnchecked(src, srcPos, dst, dstPos, length); in arraycopy()
499 char[] dst, int dstPos, int length); in arraycopyCharUnchecked() argument
518 public static void arraycopy(byte[] src, int srcPos, byte[] dst, int dstPos, int length) { in arraycopy() argument
[all …]
/libcore/ojluni/src/main/java/java/util/
DBase64.java262 byte[] dst = new byte[len]; in encode()
263 int ret = encode0(src, 0, src.length, dst); in encode()
264 if (ret != dst.length) in encode()
265 return Arrays.copyOf(dst, ret); in encode()
266 return dst; in encode()
288 public int encode(byte[] src, byte[] dst) { in encode() argument
290 if (dst.length < len) in encode()
293 return encode0(src, 0, src.length, dst); in encode()
335 byte[] dst = new byte[len]; in encode()
341 dst); in encode()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DByteBufferScalarVersusVectorBenchmark.java29 ByteBuffer dst = ByteBufferBenchmark.newBuffer(byteOrder, aligned, bufferType); in timeManualByteBufferCopy() local
32 dst.position(0); in timeManualByteBufferCopy()
34 dst.put(src.get()); in timeManualByteBufferCopy()
41 byte[] dst = new byte[8192]; in timeByteBufferBulkGet()
44 src.get(dst, 0, dst.length); in timeByteBufferBulkGet()
50 byte[] dst = new byte[8192]; in timeDirectByteBufferBulkGet()
53 src.get(dst, 0, dst.length); in timeDirectByteBufferBulkGet()
DByteBufferBenchmark.java96 byte[] dst = new byte[1024]; in timeByteBuffer_getByteArray()
100 src.get(dst); in timeByteBuffer_getByteArray()
127 char[] dst = new char[1024]; in timeCharBuffer_getCharArray() local
131 src.get(dst); in timeCharBuffer_getCharArray()
158 double[] dst = new double[1024]; in timeDoubleBuffer_getDoubleArray() local
162 src.get(dst); in timeDoubleBuffer_getDoubleArray()
179 float[] dst = new float[1024]; in timeFloatBuffer_getFloatArray() local
183 src.get(dst); in timeFloatBuffer_getFloatArray()
200 int[] dst = new int[1024]; in timeIntBuffer_getIntArray() local
204 src.get(dst); in timeIntBuffer_getIntArray()
[all …]
/libcore/ojluni/src/main/java/java/nio/
DByteBuffer.java526 public ByteBuffer get(byte[] dst, int offset, int length) { in get() argument
527 checkBounds(offset, length, dst.length); in get()
532 dst[i] = get(); in get()
555 public ByteBuffer get(byte[] dst) { in get() argument
556 return get(dst, 0, dst.length); in get()
635 final ByteBuffer dst = this; in put() local
636 final Object dstObject = dst.isDirect() ? dst : dst.hb; in put()
637 int dstOffset = dst.position(); in put()
638 if (!dst.isDirect()) { in put()
639 dstOffset += dst.offset; in put()
[all …]
DHeapByteBuffer.java120 public ByteBuffer get(byte[] dst, int offset, int length) { in get() argument
121 checkBounds(offset, length, dst.length); in get()
124 System.arraycopy(hb, ix(position()), dst, offset, length); in get()
211 void getUnchecked(int pos, char[] dst, int dstOffset, int length) { in getUnchecked() argument
212 Memory.unsafeBulkGet(dst, dstOffset, length * 2, hb, ix(pos), 2, !nativeByteOrder); in getUnchecked()
272 void getUnchecked(int pos, short[] dst, int dstOffset, int length) { in getUnchecked() argument
273 Memory.unsafeBulkGet(dst, dstOffset, length * 2, hb, ix(pos), 2, !nativeByteOrder); in getUnchecked()
333 void getUnchecked(int pos, int[] dst, int dstOffset, int length) { in getUnchecked() argument
334 Memory.unsafeBulkGet(dst, dstOffset, length * 4, hb, ix(pos), 4, !nativeByteOrder); in getUnchecked()
395 void getUnchecked(int pos, long[] dst, int dstOffset, int length) { in getUnchecked() argument
[all …]
DFloatBuffer.java387 public FloatBuffer get(float[] dst, int offset, int length) { in get() argument
388 checkBounds(offset, length, dst.length); in get()
393 dst[i] = get(); in get()
416 public FloatBuffer get(float[] dst) { in get() argument
417 return get(dst, 0, dst.length); in get()
/libcore/luni/src/test/native/
Dlibcore_io_Memory_test.cpp30 uint8_t* dst = nullptr; in swap_align_test() local
32 ASSERT_EQ(0, posix_memalign(reinterpret_cast<void**>(&dst), ALIGNMENT, in swap_align_test()
45 T* dst_aligned = reinterpret_cast<T*>(&dst[dst_align]); in swap_align_test()
55 free(dst); in swap_align_test()
62 swap_align_test<jshort, 9> (swapShorts, [] (jshort* src, jshort* dst, uint64_t i) { in TEST() argument
64 *dst = (2*i) | ((2*(i+1)) << 8); in TEST()
69 swap_align_test<jint, 10> (swapInts, [] (jint* src, jint* dst, uint64_t i) { in TEST() argument
71 *dst = (4*i) | ((4*(i+1)) << 8) | ((4*(i+2)) << 16) | ((4*(i+3)) << 24); in TEST()
76 swap_align_test<jlong, 10> (swapLongs, [] (jlong* src, jlong* dst, uint64_t i) { in TEST() argument
79 *dst = (8*i) | ((8*(i+1)) << 8) | ((8*(i+2)) << 16) | ((8*(i+3)) << 24) | in TEST()
[all …]
/libcore/luni/src/main/java/java/nio/charset/
DModifiedUtf8.java67 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()
/libcore/ojluni/src/main/java/sun/net/util/
DIPAddressUtil.java143 byte[] dst = new byte[INADDR16SZ]; in textToNumericFormatV6()
187 dst[j++] = (byte) ((val >> 8) & 0xff); in textToNumericFormatV6()
188 dst[j++] = (byte) (val & 0xff); in textToNumericFormatV6()
209 dst[j++] = v4addr[k]; in textToNumericFormatV6()
219 dst[j++] = (byte) ((val >> 8) & 0xff); in textToNumericFormatV6()
220 dst[j++] = (byte) (val & 0xff); in textToNumericFormatV6()
229 dst[INADDR16SZ - i] = dst[colonp + n - i]; in textToNumericFormatV6()
230 dst[colonp + n - i] = 0; in textToNumericFormatV6()
236 byte[] newdst = convertFromIPv4MappedAddress(dst); in textToNumericFormatV6()
240 return dst; in textToNumericFormatV6()
/libcore/dom/src/test/java/org/w3c/domts/
DUserDataNotification.java26 private final Node dst; field in UserDataNotification
36 Node dst) { in UserDataNotification() argument
41 this.dst = dst; in UserDataNotification()
86 return dst; in getDst()
/libcore/luni/src/test/java/libcore/libcore/io/
DMemoryMappedFileTest.java407 int[] dst = new int[2]; in checkIntArrayZeroReadCases() local
411 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
415 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
419 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
423 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
426 assertReadIntArrayFails(iterator, dst, 0, 3); // dst can only hold 2 ints in checkIntArrayZeroReadCases()
429 assertReadIntArrayFails(iterator, dst, 1, 2); in checkIntArrayZeroReadCases()
432 assertReadIntArrayFails(iterator, dst, -1, 2); in checkIntArrayZeroReadCases()
433 assertReadIntArrayFails(iterator, dst, 2, 2); in checkIntArrayZeroReadCases()
491 byte[] dst = new byte[10]; in checkByteArrayZeroReadCases()
[all …]
/libcore/luni/src/main/native/
Dlibcore_io_Memory.cpp65 jint* dst = reinterpret_cast<jint*>(dstShorts); in swapShorts() local
69 put_unaligned<jint>(dst++, bswap_2x16(v)); in swapShorts()
73 put_unaligned<jshort>(reinterpret_cast<jshort*>(dst), bswap_16(v)); in swapShorts()
85 jint* dst = reinterpret_cast<jint*>(dstLongs); in swapLongs() local
90 put_unaligned<jint>(dst++, bswap_32(v2)); in swapLongs()
91 put_unaligned<jint>(dst++, bswap_32(v1)); in swapLongs()
111 static void Memory_peekByteArray(JNIEnv* env, jclass, jlong srcAddress, jbyteArray dst, jint dstOff… in Memory_peekByteArray() argument
112 env->SetByteArrayRegion(dst, dstOffset, byteCount, cast<const jbyte*>(srcAddress)); in Memory_peekByteArray()
124 Scoped ## JNI_NAME ## ArrayRW elements(env, dst); \
132 env->Set ## JNI_NAME ## ArrayRegion(dst, dstOffset, count, src); \
[all …]
/libcore/ojluni/src/main/java/javax/net/ssl/
DSSLEngine.java1114 ByteBuffer dst) throws SSLException { in wrap() argument
1115 return wrap(new ByteBuffer [] { src }, 0, 1, dst); in wrap()
1151 ByteBuffer dst) throws SSLException { in wrap() argument
1155 return wrap(srcs, 0, srcs.length, dst); in wrap()
1235 int length, ByteBuffer dst) throws SSLException; in wrap() argument
1269 ByteBuffer dst) throws SSLException { in unwrap() argument
1270 return unwrap(src, new ByteBuffer [] { dst }, 0, 1); in unwrap()
/libcore/ojluni/src/main/java/java/text/
DDateFormatSymbols.java948 private void copyMembers(DateFormatSymbols src, DateFormatSymbols dst) in copyMembers() argument
950 dst.locale = src.locale; in copyMembers()
951 dst.eras = Arrays.copyOf(src.eras, src.eras.length); in copyMembers()
952 dst.months = Arrays.copyOf(src.months, src.months.length); in copyMembers()
953 dst.shortMonths = Arrays.copyOf(src.shortMonths, src.shortMonths.length); in copyMembers()
954 dst.weekdays = Arrays.copyOf(src.weekdays, src.weekdays.length); in copyMembers()
955 dst.shortWeekdays = Arrays.copyOf(src.shortWeekdays, src.shortWeekdays.length); in copyMembers()
956 dst.ampms = Arrays.copyOf(src.ampms, src.ampms.length); in copyMembers()
958 dst.zoneStrings = src.getZoneStringsImpl(true); in copyMembers()
960 dst.zoneStrings = null; in copyMembers()
[all …]
/libcore/ojluni/src/main/native/
DObjectInputStream.c52 jfloatArray dst, in Java_java_io_ObjectInputStream_bytesToFloats() argument
78 if (dst == NULL) { in Java_java_io_ObjectInputStream_bytesToFloats()
83 floats = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectInputStream_bytesToFloats()
102 (*env)->ReleasePrimitiveArrayCritical(env, dst, floats, 0); in Java_java_io_ObjectInputStream_bytesToFloats()
119 jdoubleArray dst, in Java_java_io_ObjectInputStream_bytesToDoubles() argument
146 if (dst == NULL) { in Java_java_io_ObjectInputStream_bytesToDoubles()
151 doubles = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectInputStream_bytesToDoubles()
175 (*env)->ReleasePrimitiveArrayCritical(env, dst, doubles, 0); in Java_java_io_ObjectInputStream_bytesToDoubles()
DObjectOutputStream.c51 jbyteArray dst, in Java_java_io_ObjectOutputStream_floatsToBytes() argument
78 if (dst == NULL) { in Java_java_io_ObjectOutputStream_floatsToBytes()
83 bytes = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectOutputStream_floatsToBytes()
106 (*env)->ReleasePrimitiveArrayCritical(env, dst, bytes, 0); in Java_java_io_ObjectOutputStream_floatsToBytes()
123 jbyteArray dst, in Java_java_io_ObjectOutputStream_doublesToBytes() argument
150 if (dst == NULL) { in Java_java_io_ObjectOutputStream_doublesToBytes()
155 bytes = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectOutputStream_doublesToBytes()
184 (*env)->ReleasePrimitiveArrayCritical(env, dst, bytes, 0); in Java_java_io_ObjectOutputStream_doublesToBytes()
DBits.c112 jobject dst, jlong dstPos, jlong length) in Java_java_nio_Bits_copyToShortArray() argument
128 GETCRITICAL(bytes, env, dst); in Java_java_nio_Bits_copyToShortArray()
137 RELEASECRITICAL(bytes, env, dst, 0); in Java_java_nio_Bits_copyToShortArray()
182 jobject dst, jlong dstPos, jlong length) in Java_java_nio_Bits_copyToIntArray() argument
198 GETCRITICAL(bytes, env, dst); in Java_java_nio_Bits_copyToIntArray()
207 RELEASECRITICAL(bytes, env, dst, 0); in Java_java_nio_Bits_copyToIntArray()
252 jobject dst, jlong dstPos, jlong length) in Java_java_nio_Bits_copyToLongArray() argument
268 GETCRITICAL(bytes, env, dst); in Java_java_nio_Bits_copyToLongArray()
277 RELEASECRITICAL(bytes, env, dst, 0); in Java_java_nio_Bits_copyToLongArray()
/libcore/luni/src/benchmark/native/
Dlibcore_io_Memory_bench.cpp27 T* dst; in swap_bench() local
36 dst = reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(dst_elems) + ALIGN); in swap_bench()
42 dst = dst_elems; in swap_bench()
45 memset(dst, 0, sizeof(T) * num_elements); in swap_bench()
49 swap_func(src, dst, num_elements); in swap_bench()
/libcore/ojluni/src/main/java/java/io/
DBufferedReader.java130 int dst; in fill() local
133 dst = 0; in fill()
141 dst = 0; in fill()
147 dst = delta; in fill()
164 dst = delta; in fill()
172 n = in.read(cb, dst, cb.length - dst); in fill()
175 nChars = dst + n; in fill()
176 nextChar = dst; in fill()

1234