Home
last modified time | relevance | path

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

12345

/libcore/luni/src/main/java/libcore/io/
DMemory.java39 public static native void unsafeBulkGet(Object dst, int dstOffset, int byteCount, in unsafeBulkGet() argument
46 public static native void unsafeBulkPut(byte[] dst, int dstOffset, int byteCount, in unsafeBulkPut() argument
98 public static void pokeInt(byte[] dst, int offset, int value, ByteOrder order) { in pokeInt() argument
100 dst[offset++] = (byte) ((value >> 24) & 0xff); in pokeInt()
101 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt()
102 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt()
103 dst[offset ] = (byte) ((value >> 0) & 0xff); in pokeInt()
105 dst[offset++] = (byte) ((value >> 0) & 0xff); in pokeInt()
106 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt()
107 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt()
[all …]
DStreams.java69 public static void readFully(InputStream in, byte[] dst) throws IOException { in readFully() argument
70 readFully(in, dst, 0, dst.length); in readFully()
79 …public static void readFully(InputStream in, byte[] dst, int offset, int byteCount) throws IOExcep… in readFully() argument
86 if (dst == null) { in readFully()
89 ArrayUtils.throwsIfOutOfBounds(dst.length, offset, byteCount); in readFully()
91 int bytesRead = in.read(dst, offset, byteCount); in readFully()
/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/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/ojluni/src/main/java/java/nio/
DByteBuffer.java527 public ByteBuffer get(byte[] dst, int offset, int length) { in get() argument
528 checkBounds(offset, length, dst.length); in get()
533 dst[i] = get(); in get()
556 public ByteBuffer get(byte[] dst) { in get() argument
557 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 …]
/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/ojluni/annotations/hiddenapi/java/nio/
DByteBuffer.java77 public java.nio.ByteBuffer get(byte[] dst, int offset, int length) { in get() argument
81 public java.nio.ByteBuffer get(byte[] dst) { in get() argument
157 abstract void getUnchecked(int pos, char[] dst, int dstOffset, int length); in getUnchecked() argument
163 abstract void putUnchecked(int pos, char[] dst, int srcOffset, int length); in putUnchecked() argument
175 abstract void getUnchecked(int pos, short[] dst, int dstOffset, int length); in getUnchecked() argument
181 abstract void putUnchecked(int pos, short[] dst, int srcOffset, int length); in putUnchecked() argument
193 abstract void getUnchecked(int pos, int[] dst, int dstOffset, int length); in getUnchecked() argument
199 abstract void putUnchecked(int pos, int[] dst, int srcOffset, int length); in putUnchecked() argument
211 abstract void getUnchecked(int pos, long[] dst, int dstOffset, int length); in getUnchecked() argument
217 abstract void putUnchecked(int pos, long[] dst, int srcOffset, int length); in putUnchecked() argument
[all …]
/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.java406 int[] dst = new int[2]; in checkIntArrayZeroReadCases() local
410 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
414 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
418 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
422 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
425 assertReadIntArrayFails(iterator, dst, 0, 3); // dst can only hold 2 ints in checkIntArrayZeroReadCases()
428 assertReadIntArrayFails(iterator, dst, 1, 2); in checkIntArrayZeroReadCases()
431 assertReadIntArrayFails(iterator, dst, -1, 2); in checkIntArrayZeroReadCases()
432 assertReadIntArrayFails(iterator, dst, 2, 2); in checkIntArrayZeroReadCases()
490 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/annotations/hiddenapi/java/lang/
DSystem.java81 private static void arraycopy(char[] src, int srcPos, char[] dst, int dstPos, int length) { in arraycopy() argument
86 char[] src, int srcPos, char[] dst, int dstPos, int length); in arraycopyCharUnchecked() argument
89 public static void arraycopy(byte[] src, int srcPos, byte[] dst, int dstPos, int length) { in arraycopy() argument
94 byte[] src, int srcPos, byte[] dst, int dstPos, int length); in arraycopyByteUnchecked() argument
97 private static void arraycopy(short[] src, int srcPos, short[] dst, int dstPos, int length) { in arraycopy() argument
102 short[] src, int srcPos, short[] dst, int dstPos, int length); in arraycopyShortUnchecked() argument
105 private static void arraycopy(int[] src, int srcPos, int[] dst, int dstPos, int length) { in arraycopy() argument
110 int[] src, int srcPos, int[] dst, int dstPos, int length); in arraycopyIntUnchecked() argument
113 private static void arraycopy(long[] src, int srcPos, long[] dst, int dstPos, int length) { in arraycopy() argument
118 long[] src, int srcPos, long[] dst, int dstPos, int length); in arraycopyLongUnchecked() argument
[all …]
/libcore/ojluni/src/main/java/java/text/
DDateFormatSymbols.java953 private void copyMembers(DateFormatSymbols src, DateFormatSymbols dst) in copyMembers() argument
955 dst.locale = src.locale; in copyMembers()
956 dst.eras = Arrays.copyOf(src.eras, src.eras.length); in copyMembers()
957 dst.months = Arrays.copyOf(src.months, src.months.length); in copyMembers()
958 dst.shortMonths = Arrays.copyOf(src.shortMonths, src.shortMonths.length); in copyMembers()
959 dst.weekdays = Arrays.copyOf(src.weekdays, src.weekdays.length); in copyMembers()
960 dst.shortWeekdays = Arrays.copyOf(src.shortWeekdays, src.shortWeekdays.length); in copyMembers()
961 dst.ampms = Arrays.copyOf(src.ampms, src.ampms.length); in copyMembers()
963 dst.zoneStrings = src.getZoneStringsImpl(true); in copyMembers()
965 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()
/libcore/ojluni/src/main/java/javax/net/ssl/
DSSLEngine.java1136 ByteBuffer dst) throws SSLException { in wrap() argument
1137 return wrap(new ByteBuffer [] { src }, 0, 1, dst); in wrap()
1173 ByteBuffer dst) throws SSLException { in wrap() argument
1177 return wrap(srcs, 0, srcs.length, dst); in wrap()
1257 int length, ByteBuffer dst) throws SSLException; in wrap() argument
1291 ByteBuffer dst) throws SSLException { in unwrap() argument
1292 return unwrap(src, new ByteBuffer [] { dst }, 0, 1); in unwrap()
/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()
/libcore/ojluni/src/main/java/java/lang/invoke/
DMethodType.java912 private static boolean explicitCastEquivalentToAsType(Class<?> src, Class<?> dst) { in explicitCastEquivalentToAsType() argument
913 if (src == dst || dst == Object.class || dst == void.class) return true; in explicitCastEquivalentToAsType()
917 return canConvert(src, dst); in explicitCastEquivalentToAsType()
918 } else if (dst.isPrimitive()) { in explicitCastEquivalentToAsType()
923 return !dst.isInterface() || dst.isAssignableFrom(src); in explicitCastEquivalentToAsType()
937 static boolean canConvert(Class<?> src, Class<?> dst) { in canConvert() argument
939 if (src == dst || src == Object.class || dst == Object.class) return true; in canConvert()
946 if (dst.isPrimitive()) { in canConvert()
948 return Wrapper.forPrimitiveType(dst).isConvertibleFrom(sw); in canConvert()
951 return dst.isAssignableFrom(sw.wrapperType()); in canConvert()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DDatagramChannelTest.java685 ByteBuffer dst = ByteBuffer.allocateDirect(CAPACITY_NORMAL) in testReceive_UnconnectedReadonly() local
687 assertTrue(dst.isReadOnly()); in testReceive_UnconnectedReadonly()
689 this.channel1.receive(dst); in testReceive_UnconnectedReadonly()
702 ByteBuffer dst = ByteBuffer.allocateDirect(CAPACITY_NORMAL); in testReceive_UnconnectedBufEmpty() local
703 assertNull(this.channel1.receive(dst)); in testReceive_UnconnectedBufEmpty()
711 ByteBuffer dst = ByteBuffer.allocateDirect(CAPACITY_ZERO); in testReceive_UnboundBufZero() local
712 assertNull(dc.receive(dst)); in testReceive_UnboundBufZero()
722 ByteBuffer dst = ByteBuffer.allocateDirect(CAPACITY_NORMAL); in testReceive_UnboundBufNotEmpty() local
724 dst.put((byte) 88); in testReceive_UnboundBufNotEmpty()
725 assertEquals(dst.position() + CAPACITY_NORMAL - 1, dst.limit()); in testReceive_UnboundBufNotEmpty()
[all …]

12345