Home
last modified time | relevance | path

Searched refs:baos (Results 1 – 25 of 125) sorted by relevance

12345

/external/cbor-java/src/test/java/co/nstant/in/cbor/decoder/
DLanguageTaggedStringDecoderTest.java25 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 …]
DCborDecoderTest.java85 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 …]
DByteStringDecoderTest.java22 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/
DDiskBasedCacheTest.java378 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/
DEndianUtilsTest.java221 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/
DDLExternal.java72 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()
DDERExternal.java77 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/
DDLExternal.java74 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()
DDERExternal.java79 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/
DDERExternal.java79 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()
DDLExternal.java74 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/
DStreamCompressorTest.java37 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/
DSevenZOutputFile.java512 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/
DInstrClassLoader.java210 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/
DCountingOutputStreamTest.java42 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()
DChunkedOutputStreamTest.java35 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/
DInplaceFileConverter.java57 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/
DProtoLiteUtilsTest.java157 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/
DLittleEndianDataOutputStreamTest.java35 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()
DLittleEndianDataInputStreamTest.java43 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/
DLittleEndianDataOutputStreamTest.java35 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()
DLittleEndianDataInputStreamTest.java43 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/
DOkioKotlinTest.kt35 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/
DBZip2CompressorInputStreamTest.java55 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/
DHuffmanTest.java46 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()

12345