Home
last modified time | relevance | path

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

1234

/external/volley/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/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/
DDERExternal.java68 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encode() local
71 baos.write(directReference.getEncoded(ASN1Encoding.DER)); in encode()
75 baos.write(indirectReference.getEncoded(ASN1Encoding.DER)); in encode()
79 baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DER)); in encode()
82 baos.write(obj.getEncoded(ASN1Encoding.DER)); in encode()
83 out.writeEncoded(BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); in encode()
DDLExternal.java68 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encode() local
71 baos.write(directReference.getEncoded(ASN1Encoding.DL)); in encode()
75 baos.write(indirectReference.getEncoded(ASN1Encoding.DL)); in encode()
79 baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DL)); in encode()
82 baos.write(obj.getEncoded(ASN1Encoding.DL)); in encode()
83 out.writeEncoded(BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); in encode()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/asn1/
DDLExternal.java70 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encode() local
73 baos.write(directReference.getEncoded(ASN1Encoding.DL)); in encode()
77 baos.write(indirectReference.getEncoded(ASN1Encoding.DL)); in encode()
81 baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DL)); in encode()
84 baos.write(obj.getEncoded(ASN1Encoding.DL)); in encode()
85 out.writeEncoded(BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); in encode()
DDERExternal.java70 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encode() local
73 baos.write(directReference.getEncoded(ASN1Encoding.DER)); in encode()
77 baos.write(indirectReference.getEncoded(ASN1Encoding.DER)); in encode()
81 baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DER)); in encode()
84 baos.write(obj.getEncoded(ASN1Encoding.DER)); in encode()
85 out.writeEncoded(BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); in encode()
/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-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/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/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/guava/guava-tests/test/com/google/common/io/
DLittleEndianDataOutputStreamTest.java37 private ByteArrayOutputStream baos = new ByteArrayOutputStream(); field in LittleEndianDataOutputStreamTest
38 private LittleEndianDataOutputStream out = new LittleEndianDataOutputStream(baos);
58 byte[] data = baos.toByteArray(); in testWriteLittleEndian()
89 byte[] data = baos.toByteArray(); in testWriteBytes()
106 byte[] data = baos.toByteArray(); in testWriteBytes_discardHighOrderBytes()
123 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()
128 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testSkipBytes() local
129 DataOutputStream out = new DataOutputStream(baos); in testSkipBytes()
135 byte[] data = baos.toByteArray(); in testSkipBytes()
/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()
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/archivers/cpio/
DCpioArchiveTest.java53 try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { in utf18RoundtripTest() argument
54 …try (CpioArchiveOutputStream os = new CpioArchiveOutputStream(baos, format, CpioConstants.BLOCK_SI… in utf18RoundtripTest()
64 baos.close(); in utf18RoundtripTest()
65 try (ByteArrayInputStream bin = new ByteArrayInputStream(baos.toByteArray()); in utf18RoundtripTest()
/external/vogar/test/vogar/testing/
DInterceptOutputStreams.java134 private final ByteArrayOutputStream baos;
140 baos = new ByteArrayOutputStream();
141 stream.set(new PrintStream(baos, true, "UTF-8"));
146 return baos.toString("UTF-8");
/external/conscrypt/openjdk-integ-tests/src/test/java/org/conscrypt/java/security/cert/
DCertificateFactoryTest.java291 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_generateCertificate_AnyLineLength_Success() local
292 baos.write(VALID_CERTIFICATE_PEM_HEADER); in test_generateCertificate_AnyLineLength_Success()
299 baos.write(Arrays.copyOfRange(VALID_CERTIFICATE_PEM_DATA, offset, end)); in test_generateCertificate_AnyLineLength_Success()
300 baos.write('\n'); in test_generateCertificate_AnyLineLength_Success()
303 baos.write(VALID_CERTIFICATE_PEM_FOOTER); in test_generateCertificate_AnyLineLength_Success()
306 cf.generateCertificate(new ByteArrayInputStream(baos.toByteArray())); in test_generateCertificate_AnyLineLength_Success()
311 baos.reset(); in test_generateCertificate_AnyLineLength_Success()
312 baos.write(VALID_CERTIFICATE_PEM_HEADER); in test_generateCertificate_AnyLineLength_Success()
609 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testCertPathEncoding() local
610 ObjectOutputStream oos = new ObjectOutputStream(baos); in testCertPathEncoding()
[all …]
/external/conscrypt/repackaged/openjdk-integ-tests/src/test/java/com/android/org/conscrypt/java/security/cert/
DCertificateFactoryTest.java294 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_generateCertificate_AnyLineLength_Success() local
295 baos.write(VALID_CERTIFICATE_PEM_HEADER); in test_generateCertificate_AnyLineLength_Success()
302 baos.write(Arrays.copyOfRange(VALID_CERTIFICATE_PEM_DATA, offset, end)); in test_generateCertificate_AnyLineLength_Success()
303 baos.write('\n'); in test_generateCertificate_AnyLineLength_Success()
306 baos.write(VALID_CERTIFICATE_PEM_FOOTER); in test_generateCertificate_AnyLineLength_Success()
309 cf.generateCertificate(new ByteArrayInputStream(baos.toByteArray())); in test_generateCertificate_AnyLineLength_Success()
314 baos.reset(); in test_generateCertificate_AnyLineLength_Success()
315 baos.write(VALID_CERTIFICATE_PEM_HEADER); in test_generateCertificate_AnyLineLength_Success()
613 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testCertPathEncoding() local
614 ObjectOutputStream oos = new ObjectOutputStream(baos); in testCertPathEncoding()
[all …]
/external/emma/tools/java/com/vladium/tools/
DClassDep.java131 final ByteArrayOStream baos = new ByteArrayOStream (8 * 1024); in getDependencies() local
152 baos.reset (); in getDependencies()
153 for (int read; (read = in.read (readbuf)) >= 0; baos.write (readbuf, 0, read)); in getDependencies()
162 final ClassDef cls = ClassDefParser.parseClass (baos.getByteArray (), baos.size ()); in getDependencies()
/external/slf4j/slf4j-jdk14/src/test/java/org/slf4j/issue/
DLoggerSerializationTest.java65 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testCanLoggerBeSerialized() local
66 ObjectOutputStream out = new ObjectOutputStream(baos); in testCanLoggerBeSerialized()
72 byte[] serializedLoggerHolder = baos.toByteArray(); in testCanLoggerBeSerialized()
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/internal/framed/
DHuffman.java128 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in decode() local
141 baos.write(node.symbol); in decode()
157 baos.write(node.symbol); in decode()
162 return baos.toByteArray(); in decode()
/external/grpc-grpc-java/okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/framed/
DHuffman.java131 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in decode() local
144 baos.write(node.symbol); in decode()
160 baos.write(node.symbol); in decode()
165 return baos.toByteArray(); in decode()
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/framed/
DHuffman.java127 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in decode() local
140 baos.write(node.symbol); in decode()
156 baos.write(node.symbol); in decode()
161 return baos.toByteArray(); in decode()
/external/apache-http/src/org/apache/http/entity/
DSerializableEntity.java68 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in createBytes() local
69 ObjectOutputStream out = new ObjectOutputStream(baos); in createBytes()
72 this.objSer = baos.toByteArray(); in createBytes()
/external/jarjar/src/main/com/tonicsystems/jarjar/util/
DStandaloneJarProcessor.java42 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in run() local
43 IoUtil.pipe(in.getInputStream(entry), baos, buf); in run() local
44 struct.data = baos.toByteArray(); in run()

1234