Home
last modified time | relevance | path

Searched refs:copyOfRange (Results 1 – 25 of 43) sorted by relevance

12

/libcore/ojluni/src/test/java/io/ByteArrayOutputStream/
DWrite.java114 assertEquals(b1, Arrays.copyOfRange(b, off1, off1 + len1), in writeTest()
120 assertEquals(Arrays.copyOfRange(b2, 0, len1), in writeTest()
121 Arrays.copyOfRange(b, off1, off1 + len1), in writeTest()
123 assertEquals(Arrays.copyOfRange(b2, len1, len1 + len2), in writeTest()
124 Arrays.copyOfRange(b, off2, off2 + len2), in writeTest()
134 assertEquals(Arrays.copyOfRange(b3, 0, len1), in writeTest()
135 Arrays.copyOfRange(b, off1, off1 + len1), in writeTest()
137 assertEquals(Arrays.copyOfRange(b3, len1, len1 + len2), in writeTest()
138 Arrays.copyOfRange(b, off2, off2 + len2), in writeTest()
140 assertEquals(Arrays.copyOfRange(b3, len1 + len2, len3), b, in writeTest()
/libcore/ojluni/src/test/java/io/InputStream/
DReadNBytes.java85 check(Arrays.equals((tmp = Arrays.copyOfRange(inputBytes, readBytes.length, length)), in test()
124 check(Arrays.equals(Arrays.copyOfRange(inputBytes, off, off + len), readBytes), in test()
125 "Expected[" + Arrays.copyOfRange(inputBytes, off, off + len) + in test()
132 check(Arrays.equals(Arrays.copyOfRange(inputBytes, off + len, max), in test()
134 "Expected[" + Arrays.copyOfRange(inputBytes, off + len, max) + in test()
/libcore/ojluni/src/test/java/io/ByteArrayInputStream/
DReadAllReadNTransferTo.java64 if (!Arrays.equals(Arrays.copyOfRange(bN, off, off+len), in testRead()
65 Arrays.copyOfRange(buf, position, position+len))) { in testRead()
75 Arrays.copyOfRange( buf, position + len, position + len + bAll.length))) { in testRead()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DArraysTest.java3659 byte[] result = Arrays.copyOfRange(byteArray, 0, arraySize * 2); in test_copyOfRange_$BII()
3667 result = Arrays.copyOfRange(byteArray, 0, arraySize / 2); in test_copyOfRange_$BII()
3672 result = Arrays.copyOfRange(byteArray, 0, 0); in test_copyOfRange_$BII()
3675 Arrays.copyOfRange((byte[]) null, 0, arraySize); in test_copyOfRange_$BII()
3681 Arrays.copyOfRange((byte[]) null, -1, arraySize); in test_copyOfRange_$BII()
3687 Arrays.copyOfRange((byte[]) null, 0, -1); in test_copyOfRange_$BII()
3693 Arrays.copyOfRange(byteArray, -1, arraySize); in test_copyOfRange_$BII()
3699 Arrays.copyOfRange(byteArray, 0, -1); in test_copyOfRange_$BII()
3704 assertEquals(byteArray.length + 1, Arrays.copyOfRange(byteArray, 0, in test_copyOfRange_$BII()
3712 short[] result = Arrays.copyOfRange(shortArray, 0, arraySize * 2); in test_copyOfRange_$SII()
[all …]
/libcore/ojluni/annotations/hiddenapi/java/util/
DArrays.java499 public static <T> T[] copyOfRange(T[] original, int from, int to) { in copyOfRange() method in Arrays
503 public static <T, U> T[] copyOfRange( in copyOfRange() method in Arrays
508 public static byte[] copyOfRange(byte[] original, int from, int to) { in copyOfRange() method in Arrays
512 public static short[] copyOfRange(short[] original, int from, int to) { in copyOfRange() method in Arrays
516 public static int[] copyOfRange(int[] original, int from, int to) { in copyOfRange() method in Arrays
520 public static long[] copyOfRange(long[] original, int from, int to) { in copyOfRange() method in Arrays
524 public static char[] copyOfRange(char[] original, int from, int to) { in copyOfRange() method in Arrays
528 public static float[] copyOfRange(float[] original, int from, int to) { in copyOfRange() method in Arrays
532 public static double[] copyOfRange(double[] original, int from, int to) { in copyOfRange() method in Arrays
536 public static boolean[] copyOfRange(boolean[] original, int from, int to) { in copyOfRange() method in Arrays
/libcore/ojluni/src/test/java/util/Arrays/
DCopyMethods.java83 int[] ar = Arrays.copyOfRange(a, 1, 3); in simpleTests()
88 ar = Arrays.copyOfRange(a, 2, 4); in simpleTests()
93 ar = Arrays.copyOfRange(a, 3, 5); in simpleTests()
107 byte[] bbr = Arrays.copyOfRange(ba, 0, j); in simpleTests()
112 byte[] br = Arrays.copyOfRange(ba, i, j); in simpleTests()
132 String[] sr4 = Arrays.copyOfRange(sa, 1, 5); in simpleTests()
367 return Arrays.copyOfRange(a, m, n, Integer[].class); in copyOfIntegerArrayRange()
DSortingNearlySortedPrimitive.java103 int[] l = Arrays.copyOfRange(a, 0, WIDTH + 2); in arrayToString()
104 int[] r = Arrays.copyOfRange(a, a.length - (WIDTH + 2), a.length); in arrayToString()
/libcore/ojluni/src/test/java/lang/invoke/
DMethodHandlesAsCollectorTest.java83 Object[] collectedArgs = Arrays.copyOfRange(args, 0, pos+1); in testAsCollector()
84 collectedArgs[pos] = Arrays.copyOfRange(args, pos, args.length); in testAsCollector()
133 collectedArgs[pos] = Arrays.copyOfRange(args, pos, pos+collect); in testAsCollector()
DSpreadCollectTest.java69 assertTrue((int) compare2FromArray.invoke(Arrays.copyOfRange(ints, 0, 2), cmp) < 0); in testAsSpreaderExample()
70 assertTrue((int) compare2FromArray.invoke(Arrays.copyOfRange(ints, 1, 3), cmp) > 0); in testAsSpreaderExample()
71 assertTrue((int) compare2FromArray.invoke(Arrays.copyOfRange(ints, 2, 4), cmp) == 0); in testAsSpreaderExample()
DRicochetTest.java247 int[] collargs = Arrays.copyOfRange(args, pos, pos+collects); in testIntCollects()
249 int[] listargs = Arrays.copyOfRange(args, 0, outputs); in testIntCollects()
287 byte[] collargs = Arrays.copyOfRange(args, pos, pos+collects); in testByteCollects()
289 byte[] listargs = Arrays.copyOfRange(args, 0, outputs); in testByteCollects()
/libcore/luni/src/test/java/libcore/java/util/
DBase64Test.java42 import static java.util.Arrays.copyOfRange;
97 for (byte b : Arrays.copyOfRange(encodedBytes, 0, endIndex)) { in checkAlphabet()
529 assertEquals("", encoder.encodeToString(copyOfRange(SAMPLE_NON_ASCII_BYTES, 0, 0))); in testEncoder_nonPrintableBytes()
530 assertEquals("_w==", encoder.encodeToString(copyOfRange(SAMPLE_NON_ASCII_BYTES, 0, 1))); in testEncoder_nonPrintableBytes()
531 assertEquals("_-4=", encoder.encodeToString(copyOfRange(SAMPLE_NON_ASCII_BYTES, 0, 2))); in testEncoder_nonPrintableBytes()
532 assertEquals("_-7d", encoder.encodeToString(copyOfRange(SAMPLE_NON_ASCII_BYTES, 0, 3))); in testEncoder_nonPrintableBytes()
533 assertEquals("_-7dzA==", encoder.encodeToString(copyOfRange(SAMPLE_NON_ASCII_BYTES, 0, 4))); in testEncoder_nonPrintableBytes()
534 assertEquals("_-7dzLs=", encoder.encodeToString(copyOfRange(SAMPLE_NON_ASCII_BYTES, 0, 5))); in testEncoder_nonPrintableBytes()
535 assertEquals("_-7dzLuq", encoder.encodeToString(copyOfRange(SAMPLE_NON_ASCII_BYTES, 0, 6))); in testEncoder_nonPrintableBytes()
536 … assertEquals("_-7dzLuqmQ==", encoder.encodeToString(copyOfRange(SAMPLE_NON_ASCII_BYTES, 0, 7))); in testEncoder_nonPrintableBytes()
[all …]
/libcore/benchmarks/src/benchmarks/
DArrayCopyBenchmark.java50 char[] dst = Arrays.copyOfRange(src, 0, 8192); in time_Arrays_copyOfRange()
/libcore/ojluni/annotations/sdk/nullability/java/util/
DArrays.annotated.java266 public static <T> T @libcore.util.NonNull [] copyOfRange(T @libcore.util.NonNull [] original, int f… in copyOfRange() method in Arrays
268 public static <T, U> T @libcore.util.NonNull [] copyOfRange(U @libcore.util.NonNull [] original, in… in copyOfRange() method in Arrays
270 public static byte @libcore.util.NonNull [] copyOfRange(byte @libcore.util.NonNull [] original, int… in copyOfRange() method in Arrays
272 public static short @libcore.util.NonNull [] copyOfRange(short @libcore.util.NonNull [] original, i… in copyOfRange() method in Arrays
274 public static int @libcore.util.NonNull [] copyOfRange(int @libcore.util.NonNull [] original, int f… in copyOfRange() method in Arrays
276 public static long @libcore.util.NonNull [] copyOfRange(long @libcore.util.NonNull [] original, int… in copyOfRange() method in Arrays
278 public static char @libcore.util.NonNull [] copyOfRange(char @libcore.util.NonNull [] original, int… in copyOfRange() method in Arrays
280 public static float @libcore.util.NonNull [] copyOfRange(float @libcore.util.NonNull [] original, i… in copyOfRange() method in Arrays
282 public static double @libcore.util.NonNull [] copyOfRange(double @libcore.util.NonNull [] original,… in copyOfRange() method in Arrays
284 public static boolean @libcore.util.NonNull [] copyOfRange(boolean @libcore.util.NonNull [] origina… in copyOfRange() method in Arrays
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
DGCMParameterSpecTest.java94 assertEquals(Arrays.toString(Arrays.copyOfRange(TEST_IV, 2, 6)), in testGetIV_Subarray_Success()
/libcore/ojluni/src/main/java/java/io/
DByteArrayInputStream.java192 byte[] result = Arrays.copyOfRange(buf, pos, count); in readAllBytes()
DInputStream.java420 buf = Arrays.copyOfRange(buf, 0, nread); in readNBytes()
/libcore/ojluni/src/main/java/java/lang/invoke/
DMethodType.java404 Class<?>[] nptypes = Arrays.copyOfRange(ptypes, 0, len+ilen); in insertParameterTypes()
547 … res = res.insertParameterTypes(arrayLength, Arrays.copyOfRange(ptypes, pos + 1, ptypes.length)); in asCollectorType()
575 nptypes = Arrays.copyOfRange(ptypes, end, len);
580 nptypes = Arrays.copyOfRange(ptypes, 0, start);
583 nptypes = Arrays.copyOfRange(ptypes, 0, start + tail);
/libcore/ojluni/src/test/java/util/zip/
DTestExtraTime.java217 !Arrays.equals(Arrays.copyOfRange(extra1, in check()
281 !Arrays.equals(Arrays.copyOfRange(extra1, in check()
/libcore/ojluni/src/main/java/java/util/zip/
DZipCoder.java185 slashBytes = Arrays.copyOfRange(doubleSlash, slash.length, doubleSlash.length); in slashBytes()
/libcore/ojluni/src/main/java/java/security/
DPKCS12Attribute.java240 bytes = Arrays.copyOfRange(bytes, 1, bytes.length); in encode()
/libcore/ojluni/src/main/java/java/util/
DArrays.java3789 public static <T> T[] copyOfRange(T[] original, int from, int to) { in copyOfRange() method in Arrays
3790 return copyOfRange(original, from, to, (Class<? extends T[]>) original.getClass()); in copyOfRange()
3827 …public static <T,U> T[] copyOfRange(U[] original, int from, int to, Class<? extends T[]> newType) { in copyOfRange() method in Arrays
3866 public static byte[] copyOfRange(byte[] original, int from, int to) { in copyOfRange() method in Arrays
3902 public static short[] copyOfRange(short[] original, int from, int to) { in copyOfRange() method in Arrays
3938 public static int[] copyOfRange(int[] original, int from, int to) { in copyOfRange() method in Arrays
3974 public static long[] copyOfRange(long[] original, int from, int to) { in copyOfRange() method in Arrays
4010 public static char[] copyOfRange(char[] original, int from, int to) { in copyOfRange() method in Arrays
4046 public static float[] copyOfRange(float[] original, int from, int to) { in copyOfRange() method in Arrays
4082 public static double[] copyOfRange(double[] original, int from, int to) { in copyOfRange() method in Arrays
[all …]
DArrayDeque.java1087 a = Arrays.copyOfRange(es, head, end, klazz); in toArray()
1090 a = Arrays.copyOfRange(es, 0, end - head, klazz); in toArray()
/libcore/luni/src/test/java/libcore/java/nio/charset/
DCharsetEncoderTest.java130 System.err.println(Arrays.toString(Arrays.copyOfRange(bb.array(), 0, bb.position()))); in testCharsetEncoderSplitSurrogates()
/libcore/ojluni/src/main/java/java/math/
DMutableBigInteger.java141 value = Arrays.copyOfRange(val.value, val.offset, val.offset + intLen); in MutableBigInteger()
164 int[] tmp = Arrays.copyOfRange(value, offset, offset + intLen); in getMagnitudeArray()
723 … return new BigInteger(Arrays.copyOfRange(value, offset+intLen-len, offset+intLen), sign); in getLower()
1425 int[] newVal = Arrays.copyOfRange(value, offset+intLen-blockEnd, offset+intLen-blockStart); in getBlock()
1516 divisor = Arrays.copyOfRange(div.value, div.offset, div.offset + div.intLen); in divideMagnitude()
/libcore/luni/src/test/java/libcore/java/lang/
DOldThreadGroupTest.java365 return Arrays.copyOfRange(all, 0, actualSize); in groups()

12