/libcore/ojluni/src/main/java/java/util/zip/ |
D | ZipCoder.java | 61 String toString(byte[] ba, int off, int length) { in toString() argument 63 return decoder().decode(ByteBuffer.wrap(ba, off, length)).toString(); in toString() 69 String toString(byte[] ba, int length) { in toString() argument 70 return toString(ba, 0, length); in toString() 73 String toString(byte[] ba) { in toString() argument 74 return toString(ba, 0, ba.length); in toString() 93 static String toStringUTF8(byte[] ba, int len) { in toStringUTF8() argument 94 return UTF8.toString(ba, 0, len); in toStringUTF8() 202 String toString(byte[] ba, int off, int length) { in toString() argument 205 return new String(ba, off, length, StandardCharsets.UTF_8); in toString()
|
/libcore/luni/src/test/java/libcore/sun/security/x509/ |
D | Utils.java | 48 byte[] ba = new byte[byteCounter]; in testWithEachSinglePart() 49 ba[byteCounter - 1] = (byte) (1 << (7 - bitCounter)); in testWithEachSinglePart() 55 Object o = objectCreator.apply(ba); in testWithEachSinglePart() 85 byte[] ba = new byte[(parts.length + bitsInAByte - 1) / bitsInAByte]; in testWithEveryOtherPart() 88 ba[i / bitsInAByte] = (byte) 170; // Binary 10101010 in testWithEveryOtherPart() 91 assertEquals(prefix + expectedResult + suffix, objectCreator.apply(ba).toString()); in testWithEveryOtherPart()
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldAndroidPrintWriterTest.java | 47 StringWriter ba = new StringWriter(); in testPrintWriter() local 48 PrintWriter b = new PrintWriter(ba); in testPrintWriter() 57 assertEquals("trueABCD1.23.045", ba.toString()); in testPrintWriter() 67 assertEquals("trueABCD1.23.045\ntrue\nA\nBCD\n1.2\n3.0\n4\n5\nTHE END", ba.toString()); in testPrintWriter()
|
D | OldAndroidInputStreamReaderTest.java | 92 byte[] ba = src.getBytes(enc[i]); in testStringy() 94 String s1 = new String(ba, enc[i]); in testStringy() 96 ByteArrayInputStream bais = new ByteArrayInputStream(ba); in testStringy()
|
D | OldAndroidPushbackReaderTest.java | 31 StringReader ba = new StringReader(str); in testPushbackReader() local 42 PushbackReader b = new PushbackReader(ba, 15); in testPushbackReader()
|
D | OldAndroidStreamTokenizerTest.java | 33 StringReader ba = new StringReader(strb); in testStreamTokenizer() local 35 StreamTokenizer b = new StreamTokenizer(ba); in testStreamTokenizer()
|
D | OldAndroidBufferedInputStreamTest.java | 34 ByteArrayInputStream ba = new ByteArrayInputStream(str.getBytes()); in testBufferedInputStream() local 46 BufferedInputStream b = new BufferedInputStream(ba, 7); in testBufferedInputStream()
|
D | OldAndroidBufferedReaderTest.java | 33 StringReader ba = new StringReader(str); in testBufferedReader() local 44 BufferedReader b = new BufferedReader(ba, 15); in testBufferedReader()
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | BitArray.java | 129 private BitArray(BitArray ba) { in BitArray() argument 130 length = ba.length; in BitArray() 131 repn = ba.repn.clone(); in BitArray() 187 BitArray ba = (BitArray) obj; in equals() 189 if (ba.length != length) return false; in equals() 192 if (repn[i] != ba.repn[i]) return false; in equals()
|
D | DerOutputStream.java | 250 public void putUnalignedBitString(BitArray ba) throws IOException { in putUnalignedBitString() argument 251 byte[] bits = ba.toByteArray(); in putUnalignedBitString() 255 write(bits.length*8 - ba.length()); // excess bits in last octet in putUnalignedBitString() 265 public void putTruncatedUnalignedBitString(BitArray ba) throws IOException { in putTruncatedUnalignedBitString() argument 266 putUnalignedBitString(ba.truncate()); in putTruncatedUnalignedBitString()
|
/libcore/ojluni/src/test/java/net/Socket/ |
D | ShutdownInput.java | 84 byte[] ba = new byte[2]; in test() 86 in.read(ba) != -1 || in test() 87 in.read(ba, 0, ba.length) != -1) { in test()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | CharsetEncoderTest.java | 178 byte[] ba = getLegalByteArray(); in testCharsetEncoderCharsetfloatfloatbyteArray() 180 CharsetEncoder ec = new MockCharsetEncoder(cs, 1, MAX_BYTES, ba); in testCharsetEncoderCharsetfloatfloatbyteArray() 184 assertTrue(Arrays.equals(ba, ec.replacement())); in testCharsetEncoderCharsetfloatfloatbyteArray() 191 ec = new MockCharsetEncoder(null, 1, MAX_BYTES, ba); in testCharsetEncoderCharsetfloatfloatbyteArray() 225 ec = new MockCharsetEncoder(cs, 0, MAX_BYTES, ba); in testCharsetEncoderCharsetfloatfloatbyteArray() 230 ec = new MockCharsetEncoder(cs, 1, 0, ba); in testCharsetEncoderCharsetfloatfloatbyteArray() 237 ec = new MockCharsetEncoder(cs, -1, MAX_BYTES, ba); in testCharsetEncoderCharsetfloatfloatbyteArray() 242 ec = new MockCharsetEncoder(cs, 1, -1, ba); in testCharsetEncoderCharsetfloatfloatbyteArray() 699 byte[] ba = new byte[out.limit() - out.position()]; in assertByteArray() 700 out.get(ba); in assertByteArray() [all …]
|
/libcore/ojluni/src/test/java/text/testlib/ |
D | HexDumpReader.java | 107 for (byte[] ba : bytes) { in toArray() 108 System.arraycopy(ba, 0, buf, ptr, ba.length); in toArray() 109 ptr += ba.length; in toArray()
|
/libcore/ojluni/src/test/java/nio/Buffer/ |
D | BasicShort.java | 1118 public static void test(final short [] ba) { in test() argument 1121 final ShortBuffer b = ShortBuffer.wrap(ba, offset, length); in test() 1123 ck(b, b.capacity(), ba.length); in test() 1128 catchIndexOutOfBounds(ba, () -> ShortBuffer.wrap(ba, -1, ba.length)); in test() 1129 catchIndexOutOfBounds(ba, () -> ShortBuffer.wrap(ba, ba.length + 1, ba.length)); in test() 1130 catchIndexOutOfBounds(ba, () -> ShortBuffer.wrap(ba, 0, -1)); in test() 1131 catchIndexOutOfBounds(ba, () -> ShortBuffer.wrap(ba, 0, ba.length + 1)); in test() 1134 tryCatch(ba, NullPointerException.class, in test() 1136 tryCatch(ba, NullPointerException.class, in test()
|
D | BasicInt.java | 1118 public static void test(final int [] ba) { in test() argument 1121 final IntBuffer b = IntBuffer.wrap(ba, offset, length); in test() 1123 ck(b, b.capacity(), ba.length); in test() 1128 catchIndexOutOfBounds(ba, () -> IntBuffer.wrap(ba, -1, ba.length)); in test() 1129 catchIndexOutOfBounds(ba, () -> IntBuffer.wrap(ba, ba.length + 1, ba.length)); in test() 1130 catchIndexOutOfBounds(ba, () -> IntBuffer.wrap(ba, 0, -1)); in test() 1131 catchIndexOutOfBounds(ba, () -> IntBuffer.wrap(ba, 0, ba.length + 1)); in test() 1134 tryCatch(ba, NullPointerException.class, in test() 1136 tryCatch(ba, NullPointerException.class, in test()
|
D | BasicLong.java | 1118 public static void test(final long [] ba) { in test() argument 1121 final LongBuffer b = LongBuffer.wrap(ba, offset, length); in test() 1123 ck(b, b.capacity(), ba.length); in test() 1128 catchIndexOutOfBounds(ba, () -> LongBuffer.wrap(ba, -1, ba.length)); in test() 1129 catchIndexOutOfBounds(ba, () -> LongBuffer.wrap(ba, ba.length + 1, ba.length)); in test() 1130 catchIndexOutOfBounds(ba, () -> LongBuffer.wrap(ba, 0, -1)); in test() 1131 catchIndexOutOfBounds(ba, () -> LongBuffer.wrap(ba, 0, ba.length + 1)); in test() 1134 tryCatch(ba, NullPointerException.class, in test() 1136 tryCatch(ba, NullPointerException.class, in test()
|
D | BasicDouble.java | 1118 public static void test(final double [] ba) { in test() argument 1121 final DoubleBuffer b = DoubleBuffer.wrap(ba, offset, length); in test() 1123 ck(b, b.capacity(), ba.length); in test() 1128 catchIndexOutOfBounds(ba, () -> DoubleBuffer.wrap(ba, -1, ba.length)); in test() 1129 catchIndexOutOfBounds(ba, () -> DoubleBuffer.wrap(ba, ba.length + 1, ba.length)); in test() 1130 catchIndexOutOfBounds(ba, () -> DoubleBuffer.wrap(ba, 0, -1)); in test() 1131 catchIndexOutOfBounds(ba, () -> DoubleBuffer.wrap(ba, 0, ba.length + 1)); in test() 1134 tryCatch(ba, NullPointerException.class, in test() 1136 tryCatch(ba, NullPointerException.class, in test()
|
D | BasicFloat.java | 1118 public static void test(final float [] ba) { in test() argument 1121 final FloatBuffer b = FloatBuffer.wrap(ba, offset, length); in test() 1123 ck(b, b.capacity(), ba.length); in test() 1128 catchIndexOutOfBounds(ba, () -> FloatBuffer.wrap(ba, -1, ba.length)); in test() 1129 catchIndexOutOfBounds(ba, () -> FloatBuffer.wrap(ba, ba.length + 1, ba.length)); in test() 1130 catchIndexOutOfBounds(ba, () -> FloatBuffer.wrap(ba, 0, -1)); in test() 1131 catchIndexOutOfBounds(ba, () -> FloatBuffer.wrap(ba, 0, ba.length + 1)); in test() 1134 tryCatch(ba, NullPointerException.class, in test() 1136 tryCatch(ba, NullPointerException.class, in test()
|
D | BasicChar.java | 1118 public static void test(final char [] ba) { in test() argument 1121 final CharBuffer b = CharBuffer.wrap(ba, offset, length); in test() 1123 ck(b, b.capacity(), ba.length); in test() 1128 catchIndexOutOfBounds(ba, () -> CharBuffer.wrap(ba, -1, ba.length)); in test() 1129 catchIndexOutOfBounds(ba, () -> CharBuffer.wrap(ba, ba.length + 1, ba.length)); in test() 1130 catchIndexOutOfBounds(ba, () -> CharBuffer.wrap(ba, 0, -1)); in test() 1131 catchIndexOutOfBounds(ba, () -> CharBuffer.wrap(ba, 0, ba.length + 1)); in test() 1134 tryCatch(ba, NullPointerException.class, in test() 1136 tryCatch(ba, NullPointerException.class, in test()
|
D | BasicByte.java | 1118 public static void test(final byte [] ba) { in test() argument 1121 final ByteBuffer b = ByteBuffer.wrap(ba, offset, length); in test() 1123 ck(b, b.capacity(), ba.length); in test() 1128 catchIndexOutOfBounds(ba, () -> ByteBuffer.wrap(ba, -1, ba.length)); in test() 1129 catchIndexOutOfBounds(ba, () -> ByteBuffer.wrap(ba, ba.length + 1, ba.length)); in test() 1130 catchIndexOutOfBounds(ba, () -> ByteBuffer.wrap(ba, 0, -1)); in test() 1131 catchIndexOutOfBounds(ba, () -> ByteBuffer.wrap(ba, 0, ba.length + 1)); in test() 1134 tryCatch(ba, NullPointerException.class, in test() 1136 tryCatch(ba, NullPointerException.class, in test()
|
/libcore/ojluni/src/main/java/java/net/ |
D | URLEncoder.java | 277 byte[] ba = str.getBytes(charset); in encode() 278 for (int j = 0; j < ba.length; j++) { in encode() 280 char ch = Character.forDigit((ba[j] >> 4) & 0xF, 16); in encode() 287 ch = Character.forDigit(ba[j] & 0xF, 16); in encode()
|
/libcore/ojluni/src/test/java/lang/String/CompactString/ |
D | CompactString.java | 72 ba = b; in StringSources() 82 return ba; in getByteArray() 94 private final byte[] ba; field in CompactString.StringSources 249 private void setUpOneString(String content, byte[] ba, char[] ca, int[] cpa) in setUpOneString() argument 252 m.put(SRC_BYTE_ARRAY_WITH_CHARSETNAME, new String(ba, in setUpOneString() 254 m.put(SRC_BYTE_ARRAY_WITH_CHARSET, new String(ba, DEFAULT_CHARSET)); in setUpOneString()
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | MessageDigestSpiTest.java | 53 byte[] ba = {0, 1, 2, 3, 4, 5}; in test_constructor() 57 mds.engineUpdate(ba[0]); in test_constructor() 58 mds.engineUpdate(ba, 0, ba.length); in test_constructor()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
D | ZipEntryTest.java | 118 byte[] ba = { 'T', 'E', 'S', 'T' }; in test_getExtra() 120 zentry.setExtra(ba); in test_getExtra() 122 ba, zentry.getExtra()); in test_getExtra() 284 byte[] ba = new byte[0xFFFF]; in test_setExtra$B() 286 zentry.setExtra(ba); in test_setExtra$B() 291 ba = new byte[0xFFFF + 1]; in test_setExtra$B() 292 zentry.setExtra(ba); in test_setExtra$B()
|
/libcore/ojluni/src/test/java/util/Arrays/ |
D | CopyMethods.java | 98 byte[] ba = (byte[]) makeArray(3, byte.class); in simpleTests() 100 System.out.println("byte[] ba = "+Arrays.toString(ba)); in simpleTests() 101 for (int j = 0; j <= ba.length+2; j++) { in simpleTests() 102 byte[] bb = Arrays.copyOf(ba, j); in simpleTests() 106 checkArray(bb, byte.class, j, 0, ba.length); in simpleTests() 107 byte[] bbr = Arrays.copyOfRange(ba, 0, j); in simpleTests() 112 byte[] br = Arrays.copyOfRange(ba, i, j); in simpleTests() 116 checkArray(br, byte.class, j-i, i, ba.length-i); in simpleTests()
|