/external/cbor-java/src/test/java/co/nstant/in/cbor/decoder/ |
D | LanguageTaggedStringDecoderTest.java | 25 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in shouldThrowException() local 26 CborEncoder encoder = new CborEncoder(baos); in shouldThrowException() 28 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in shouldThrowException() 39 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testExceptionOnNotAnArray() local 40 CborEncoder encoder = new CborEncoder(baos); in testExceptionOnNotAnArray() 42 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testExceptionOnNotAnArray() 53 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testExceptionOnNot2ElementArray() local 54 CborEncoder encoder = new CborEncoder(baos); in testExceptionOnNot2ElementArray() 56 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testExceptionOnNot2ElementArray() 67 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testExceptionOnNotFirstElementIsString() local [all …]
|
D | CborDecoderTest.java | 85 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in shouldThrowOnRationalNumberDecode1() local 86 CborEncoder encoder = new CborEncoder(baos); in shouldThrowOnRationalNumberDecode1() 88 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in shouldThrowOnRationalNumberDecode1() 99 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in shouldThrowOnRationalNumberDecode2() local 100 CborEncoder encoder = new CborEncoder(baos); in shouldThrowOnRationalNumberDecode2() 102 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in shouldThrowOnRationalNumberDecode2() 113 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in shouldThrowOnRationalNumberDecode3() local 114 CborEncoder encoder = new CborEncoder(baos); in shouldThrowOnRationalNumberDecode3() 116 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in shouldThrowOnRationalNumberDecode3() 127 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in shouldThrowOnRationalNumberDecode4() local [all …]
|
D | ByteStringDecoderTest.java | 22 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in shouldDecodeChunkedByteString() local 23 CborEncoder encoder = new CborEncoder(baos); in shouldDecodeChunkedByteString() 31 byte[] encodedBytes = baos.toByteArray(); in shouldDecodeChunkedByteString() 41 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in shouldDecodeByteString1K() local 42 CborEncoder encoder = new CborEncoder(baos); in shouldDecodeByteString1K() 44 byte[] encodedBytes = baos.toByteArray(); in shouldDecodeByteString1K() 54 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in shouldDecodeByteString1M() local 55 CborEncoder encoder = new CborEncoder(baos); in shouldDecodeByteString1M() 57 byte[] encodedBytes = baos.toByteArray(); in shouldDecodeByteString1M()
|
/external/volley/core/src/test/java/com/android/volley/toolbox/ |
D | DiskBasedCacheTest.java | 378 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testReadHeaderListWithNegativeSize() local 379 DiskBasedCache.writeInt(baos, -1); // negative size in testReadHeaderListWithNegativeSize() 382 new ByteArrayInputStream(baos.toByteArray()), Integer.MAX_VALUE); in testReadHeaderListWithNegativeSize() 392 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testReadHeaderListWithGinormousSize() local 393 DiskBasedCache.writeInt(baos, Integer.MAX_VALUE); // 2GB size in testReadHeaderListWithGinormousSize() 395 new CountingInputStream(new ByteArrayInputStream(baos.toByteArray()), baos.size()); in testReadHeaderListWithGinormousSize() 509 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in serializeInt() local 510 DiskBasedCache.writeInt(baos, 0); in serializeInt() 511 DiskBasedCache.writeInt(baos, 19791214); in serializeInt() 512 DiskBasedCache.writeInt(baos, -20050711); in serializeInt() [all …]
|
/external/apache-commons-io/src/test/java/org/apache/commons/io/ |
D | EndianUtilsTest.java | 221 final ByteArrayOutputStream baos = new ByteArrayOutputStream(8); in testWriteSwappedDouble() local 222 EndianUtils.writeSwappedDouble( baos, d1 ); in testWriteSwappedDouble() 223 bytes = baos.toByteArray(); in testWriteSwappedDouble() 244 final ByteArrayOutputStream baos = new ByteArrayOutputStream(4); in testWriteSwappedFloat() local 245 EndianUtils.writeSwappedFloat( baos, f1 ); in testWriteSwappedFloat() 246 bytes = baos.toByteArray(); in testWriteSwappedFloat() 262 final ByteArrayOutputStream baos = new ByteArrayOutputStream(4); in testWriteSwappedInteger() local 263 EndianUtils.writeSwappedInteger( baos, 0x01020304 ); in testWriteSwappedInteger() 264 bytes = baos.toByteArray(); in testWriteSwappedInteger() 284 final ByteArrayOutputStream baos = new ByteArrayOutputStream(8); in testWriteSwappedLong() local [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/ |
D | DLExternal.java | 72 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encode() local 75 baos.write(directReference.getEncoded(ASN1Encoding.DL)); in encode() 79 baos.write(indirectReference.getEncoded(ASN1Encoding.DL)); in encode() 83 baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DL)); in encode() 86 baos.write(obj.getEncoded(ASN1Encoding.DL)); in encode() 88 out.writeEncoded(withTag, BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); in encode()
|
D | DERExternal.java | 77 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encode() local 80 baos.write(directReference.getEncoded(ASN1Encoding.DER)); in encode() 84 baos.write(indirectReference.getEncoded(ASN1Encoding.DER)); in encode() 88 baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DER)); in encode() 91 baos.write(obj.getEncoded(ASN1Encoding.DER)); in encode() 93 out.writeEncoded(withTag, BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); in encode()
|
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/asn1/ |
D | DLExternal.java | 74 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encode() local 77 baos.write(directReference.getEncoded(ASN1Encoding.DL)); in encode() 81 baos.write(indirectReference.getEncoded(ASN1Encoding.DL)); in encode() 85 baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DL)); in encode() 88 baos.write(obj.getEncoded(ASN1Encoding.DL)); in encode() 90 out.writeEncoded(withTag, BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); in encode()
|
D | DERExternal.java | 79 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encode() local 82 baos.write(directReference.getEncoded(ASN1Encoding.DER)); in encode() 86 baos.write(indirectReference.getEncoded(ASN1Encoding.DER)); in encode() 90 baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DER)); in encode() 93 baos.write(obj.getEncoded(ASN1Encoding.DER)); in encode() 95 out.writeEncoded(withTag, BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); in encode()
|
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/asn1/ |
D | DERExternal.java | 79 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encode() local 82 baos.write(directReference.getEncoded(ASN1Encoding.DER)); in encode() 86 baos.write(indirectReference.getEncoded(ASN1Encoding.DER)); in encode() 90 baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DER)); in encode() 93 baos.write(obj.getEncoded(ASN1Encoding.DER)); in encode() 95 out.writeEncoded(withTag, BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); in encode()
|
D | DLExternal.java | 74 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encode() local 77 baos.write(directReference.getEncoded(ASN1Encoding.DL)); in encode() 81 baos.write(indirectReference.getEncoded(ASN1Encoding.DL)); in encode() 85 baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DL)); in encode() 88 baos.write(obj.getEncoded(ASN1Encoding.DL)); in encode() 90 out.writeEncoded(withTag, BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); in encode()
|
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/archivers/zip/ |
D | StreamCompressorTest.java | 37 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in storedEntries() local 38 final StreamCompressor sc = StreamCompressor.create( baos); in storedEntries() 45 assertEquals("ABADCAFE", baos.toString()); in storedEntries() 50 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in deflatedEntries() local 51 final StreamCompressor sc = StreamCompressor.create( baos); in deflatedEntries() 57 final byte[] actuals = baos.toByteArray(); in deflatedEntries()
|
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/archivers/sevenz/ |
D | SevenZOutputFile.java | 512 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); 513 final DataOutputStream out = new DataOutputStream(baos); 516 final byte[] contents = baos.toByteArray(); 535 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); 536 final DataOutputStream out = new DataOutputStream(baos); 539 final byte[] contents = baos.toByteArray(); 558 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); 559 final DataOutputStream out = new DataOutputStream(baos); 562 final byte[] contents = baos.toByteArray(); 571 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); [all …]
|
/external/emma/core/java12/com/vladium/emma/rt/ |
D | InstrClassLoader.java | 210 final ByteArrayOStream baos = buf.m_baos; // reset() has been called on this in findClass() local 216 …if ((m_hook != null) && m_hook.processClassDef (name, bytes, length, baos)) // note: this can over… in findClass() 219 bytes = baos.getByteArray (); in findClass() 220 length = baos.size (); in findClass() 264 final ByteArrayOStream baos = buf.m_baos; // reset() has been called on this in findClass() local 266 readFully (in, baos, buf.m_buf); in findClass() 271 bytes = baos.getByteArray (); in findClass() 272 length = baos.size (); in findClass() 274 baos.reset (); // reuse this for processClassDef below in findClass() 276 …if ((m_hook != null) && m_hook.processClassDef (name, bytes, length, baos)) // note: this can over… in findClass() [all …]
|
/external/apache-commons-io/src/test/java/org/apache/commons/io/output/ |
D | CountingOutputStreamTest.java | 42 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testCounting() local 43 try (CountingOutputStream cos = new CountingOutputStream(baos)) { in testCounting() 48 assertByteArrayEquals("CountingOutputStream.write(int)", baos.toByteArray(), 0, 20); in testCounting() 56 assertByteArrayEquals("CountingOutputStream.write(byte[])", baos.toByteArray(), 0, 30); in testCounting() 63 … assertByteArrayEquals("CountingOutputStream.write(byte[], int, int)", baos.toByteArray(), 0, 35); in testCounting() 72 assertByteArrayEquals("CountingOutputStream.write(int)", baos.toByteArray(), 35, 45); in testCounting()
|
D | ChunkedOutputStreamTest.java | 35 try (ByteArrayOutputStream baos = newByteArrayOutputStream(numWrites); in defaultConstructor() argument 36 final ChunkedOutputStream chunked = new ChunkedOutputStream(baos)) { in defaultConstructor() 60 try (ByteArrayOutputStream baos = newByteArrayOutputStream(numWrites); 61 final ChunkedOutputStream chunked = new ChunkedOutputStream(baos, 10)) {
|
/external/slf4j/slf4j-migrator/src/main/java/org/slf4j/migrator/ |
D | InplaceFileConverter.java | 57 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in readIntoByteArray() local 62 baos.write(buffer, 0, n); in readIntoByteArray() 65 return baos.toByteArray(); in readIntoByteArray() 91 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in convertIntoTempByteArray() local 96 writeReplacement(baos, replacement); in convertIntoTempByteArray() 101 return baos.toByteArray(); in convertIntoTempByteArray()
|
/external/grpc-grpc-java/protobuf-lite/src/test/java/io/grpc/protobuf/lite/ |
D | ProtoLiteUtilsTest.java | 157 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testDrainTo_all() local 158 int drained = d.drainTo(baos); in testDrainTo_all() 159 assertEquals(baos.size(), drained); in testDrainTo_all() 160 assertArrayEquals(golden, baos.toByteArray()); in testDrainTo_all() 175 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testDrainTo_partial() local 176 int drained = d.drainTo(baos); in testDrainTo_partial() 177 assertEquals(baos.size(), drained); in testDrainTo_partial() 178 assertArrayEquals(golden, baos.toByteArray()); in testDrainTo_partial() 187 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testDrainTo_none() local 188 assertEquals(0, d.drainTo(baos)); in testDrainTo_none() [all …]
|
/external/guava/android/guava-tests/test/com/google/common/io/ |
D | LittleEndianDataOutputStreamTest.java | 35 private ByteArrayOutputStream baos = new ByteArrayOutputStream(); field in LittleEndianDataOutputStreamTest 36 private LittleEndianDataOutputStream out = new LittleEndianDataOutputStream(baos); 56 byte[] data = baos.toByteArray(); in testWriteLittleEndian() 87 byte[] data = baos.toByteArray(); in testWriteBytes() 104 byte[] data = baos.toByteArray(); in testWriteBytes_discardHighOrderBytes() 121 byte[] data = baos.toByteArray(); in testWriteChars()
|
D | LittleEndianDataInputStreamTest.java | 43 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in setUp() local 44 DataOutputStream out = new DataOutputStream(baos); in setUp() 48 data = baos.toByteArray(); in setUp() 130 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testSkipBytes() local 131 DataOutputStream out = new DataOutputStream(baos); in testSkipBytes() 137 byte[] data = baos.toByteArray(); in testSkipBytes()
|
/external/guava/guava-tests/test/com/google/common/io/ |
D | LittleEndianDataOutputStreamTest.java | 35 private ByteArrayOutputStream baos = new ByteArrayOutputStream(); field in LittleEndianDataOutputStreamTest 36 private LittleEndianDataOutputStream out = new LittleEndianDataOutputStream(baos); 56 byte[] data = baos.toByteArray(); in testWriteLittleEndian() 87 byte[] data = baos.toByteArray(); in testWriteBytes() 104 byte[] data = baos.toByteArray(); in testWriteBytes_discardHighOrderBytes() 121 byte[] data = baos.toByteArray(); in testWriteChars()
|
D | LittleEndianDataInputStreamTest.java | 43 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in setUp() local 44 DataOutputStream out = new DataOutputStream(baos); in setUp() 48 data = baos.toByteArray(); in setUp() 130 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testSkipBytes() local 131 DataOutputStream out = new DataOutputStream(baos); in testSkipBytes() 137 byte[] data = baos.toByteArray(); in testSkipBytes()
|
/external/okio/okio/src/jvmTest/kotlin/okio/ |
D | OkioKotlinTest.kt | 35 val baos = ByteArrayOutputStream() in outputStreamSink() constant 36 val sink = baos.sink() in outputStreamSink() 38 assertThat(baos.toByteArray()).isEqualTo(byteArrayOf(0x61)) in outputStreamSink() 107 val baos = ByteArrayOutputStream() in socketSink() constant 109 override fun getOutputStream() = baos in socketSink() 113 assertThat(baos.toByteArray()).isEqualTo(byteArrayOf(0x61)) in socketSink()
|
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/compressors/bzip2/ |
D | BZip2CompressorInputStreamTest.java | 55 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in readOfLength0ShouldReturn0() local 56 final BZip2CompressorOutputStream bzipOut = new BZip2CompressorOutputStream(baos); in readOfLength0ShouldReturn0() 60 baos.flush(); in readOfLength0ShouldReturn0() 61 baos.close(); in readOfLength0ShouldReturn0() 64 final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in readOfLength0ShouldReturn0()
|
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/framed/ |
D | HuffmanTest.java | 46 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in assertRoundTrip() local 47 DataOutputStream dos = new DataOutputStream(baos); in assertRoundTrip() 50 assertEquals(baos.size(), Huffman.get().encodedLength(buf)); in assertRoundTrip() 52 byte[] decodedBytes = Huffman.get().decode(baos.toByteArray()); in assertRoundTrip()
|