Home
last modified time | relevance | path

Searched refs:bos (Results 1 – 25 of 109) sorted by relevance

12345

/external/apache-commons-compress/src/test/java/org/apache/commons/compress/utils/
DByteUtilsTest.java145 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in toLittleEndianToStream() local
146 toLittleEndian(bos, 2 + 3 * 256 + 4 * 256 * 256, 3); in toLittleEndianToStream()
147 bos.close(); in toLittleEndianToStream()
148 assertArrayEquals(new byte[] { 2, 3, 4 }, bos.toByteArray()); in toLittleEndianToStream()
153 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in toLittleEndianToStreamUnsignedInt32() local
154 toLittleEndian(bos, 2 + 3 * 256 + 4 * 256 * 256 + 128l * 256 * 256 * 256, 4); in toLittleEndianToStreamUnsignedInt32()
155 bos.close(); in toLittleEndianToStreamUnsignedInt32()
156 assertArrayEquals(new byte[] { 2, 3, 4, (byte) 128 }, bos.toByteArray()); in toLittleEndianToStreamUnsignedInt32()
161 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in toLittleEndianToConsumer() local
162 toLittleEndian(new OutputStreamByteConsumer(bos), 2 + 3 * 256 + 4 * 256 * 256, 3); in toLittleEndianToConsumer()
[all …]
DFixedLengthBlockOutputStreamTest.java66 ByteArrayOutputStream bos = mock.bos; in testWriteSingleBytes() local
75 byte[] output = bos.toByteArray(); in testWriteSingleBytes()
104 ByteArrayOutputStream bos = mock.bos; in testMultiWriteBuf() local
106 assertEquals("wrong size", (long) v, bos.size()); in testMultiWriteBuf()
108 byte[] output = bos.toByteArray(); in testMultiWriteBuf()
230 ByteArrayOutputStream bos = mock.bos; in testBuf() local
237 assertEquals("wrong size", (long) v, bos.size()); in testBuf()
238 byte[] output = bos.toByteArray(); in testBuf()
241 for (int i = msg.length; i < bos.size(); i++) { in testBuf()
261 ByteArrayOutputStream bos = mock.bos; in testWriteAndPad() local
[all …]
DCountingStreamTest.java35 final ByteArrayOutputStream bos = new ByteArrayOutputStream(); in output() local
36 try (final CountingOutputStream o = new CountingOutputStream(bos)) { in output()
48 assertArrayEquals(new byte[] { 1, 2, 3, 4 }, bos.toByteArray()); in output()
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/compressors/lz4/
DBlockLZ4CompressorOutputStreamTest.java94 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in canWritePairWithoutLiterals() local
95 p.writeTo(bos); in canWritePairWithoutLiterals()
96 Assert.assertArrayEquals(new byte[] { 0, 1, 0 }, bos.toByteArray()); in canWritePairWithoutLiterals()
103 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in writesCorrectSizeFor19ByteLengthBackReference() local
104 p.writeTo(bos); in writesCorrectSizeFor19ByteLengthBackReference()
105 Assert.assertArrayEquals(new byte[] { 15, 1, 0, 0 }, bos.toByteArray()); in writesCorrectSizeFor19ByteLengthBackReference()
112 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in writesCorrectSizeFor273ByteLengthBackReference() local
113 p.writeTo(bos); in writesCorrectSizeFor273ByteLengthBackReference()
114 Assert.assertArrayEquals(new byte[] { 15, 1, 0, (byte) 254 }, bos.toByteArray()); in writesCorrectSizeFor273ByteLengthBackReference()
121 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in writesCorrectSizeFor274ByteLengthBackReference() local
[all …]
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/archivers/tar/
DTarArchiveOutputStreamTest.java102 final ByteArrayOutputStream bos = new ByteArrayOutputStream(); in testBigNumberStarMode() local
103 final TarArchiveOutputStream tos = new TarArchiveOutputStream(bos); in testBigNumberStarMode()
108 final byte[] data = bos.toByteArray(); in testBigNumberStarMode()
128 final ByteArrayOutputStream bos = new ByteArrayOutputStream(); in testBigNumberPosixMode() local
129 final TarArchiveOutputStream tos = new TarArchiveOutputStream(bos); in testBigNumberPosixMode()
134 final byte[] data = bos.toByteArray(); in testBigNumberPosixMode()
205 final ByteArrayOutputStream bos = new ByteArrayOutputStream(); in writePaxHeader() local
206 final TarArchiveOutputStream tos = new TarArchiveOutputStream(bos, "ASCII"); in writePaxHeader()
217 return bos.toByteArray(); in writePaxHeader()
228 final ByteArrayOutputStream bos = new ByteArrayOutputStream(); in testWriteLongFileNamePosixMode() local
[all …]
/external/libdrm/radeon/
Dradeon_cs_space.c126 ret = radeon_cs_setup_bo(&cs->bos[i], &sizes); in radeon_cs_do_space_check()
156 bo = cs->bos[i].bo; in radeon_cs_do_space_check()
157 bo->space_accounted = cs->bos[i].new_accounted; in radeon_cs_do_space_check()
173 if (csi->bos[i].bo == boi && in radeon_cs_space_add_persistent_bo()
174 csi->bos[i].read_domains == read_domains && in radeon_cs_space_add_persistent_bo()
175 csi->bos[i].write_domain == write_domain) in radeon_cs_space_add_persistent_bo()
180 csi->bos[i].bo = boi; in radeon_cs_space_add_persistent_bo()
181 csi->bos[i].read_domains = read_domains; in radeon_cs_space_add_persistent_bo()
182 csi->bos[i].write_domain = write_domain; in radeon_cs_space_add_persistent_bo()
183 csi->bos[i].new_accounted = 0; in radeon_cs_space_add_persistent_bo()
[all …]
/external/apache-harmony/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/util/
DEnvironmentHelper.java37 ByteArrayOutputStream bos = null; in PropertiesToInputStream() local
39 bos = new ByteArrayOutputStream(); in PropertiesToInputStream()
40 p.store(bos, ""); in PropertiesToInputStream()
41 return new ByteArrayInputStream(bos.toByteArray()); in PropertiesToInputStream()
47 bos.close(); in PropertiesToInputStream()
/external/ksoap2/ksoap2-base/src/main/java/org/ksoap2/transport/
DTransport.java145 ByteArrayOutputStream bos = new ByteArrayOutputStream(bufferLength); in createRequestData() local
147 bos.write(xmlVersionTag.getBytes()); in createRequestData()
153 xw.setOutput(bos, encoding); in createRequestData()
160 bos.write('\r'); in createRequestData()
161 bos.write('\n'); in createRequestData()
162 bos.flush(); in createRequestData()
163 result = bos.toByteArray(); in createRequestData()
165 bos = null; in createRequestData()
/external/libdrm/etnaviv/
Detnaviv_cmd_stream.c132 idx = APPEND(&priv->submit, bos); in append_bo()
133 idx = APPEND(priv, bos); in append_bo()
135 priv->submit.bos[idx].flags = 0; in append_bo()
136 priv->submit.bos[idx].handle = bo->handle; in append_bo()
138 priv->bos[idx] = etna_bo_ref(bo); in append_bo()
161 if (priv->bos[idx] == bo) in bo2idx()
171 priv->submit.bos[idx].flags |= ETNA_SUBMIT_BO_READ; in bo2idx()
173 priv->submit.bos[idx].flags |= ETNA_SUBMIT_BO_WRITE; in bo2idx()
188 .bos = VOID2U64(priv->submit.bos), in flush()
215 struct etna_bo *bo = priv->bos[i]; in flush()
/external/libusb/examples/
Dtestlibusb.c101 struct libusb_bos_descriptor *bos; in print_bos() local
104 ret = libusb_get_bos_descriptor(handle, &bos); in print_bos()
110 printf(" wTotalLength: %d\n", bos->wTotalLength); in print_bos()
111 printf(" bNumDeviceCaps: %d\n", bos->bNumDeviceCaps); in print_bos()
113 if(bos->dev_capability[0]->bDevCapabilityType == LIBUSB_BT_USB_2_0_EXTENSION) { in print_bos()
116 … ret = libusb_get_usb_2_0_extension_descriptor(NULL, bos->dev_capability[0],&usb_2_0_extension); in print_bos()
125 if(bos->dev_capability[0]->bDevCapabilityType == LIBUSB_BT_SS_USB_DEVICE_CAPABILITY) { in print_bos()
128 ret = libusb_get_ss_usb_device_capability_descriptor(NULL, bos->dev_capability[0],&dev_cap); in print_bos()
137 libusb_free_bos_descriptor(bos); in print_bos()
/external/libdrm/freedreno/msm/
Dmsm_ringbuffer.c61 struct drm_msm_gem_submit_bo *bos; member
71 struct fd_bo **bos; member
202 idx = APPEND(&msm_ring->submit, bos); in append_bo()
203 idx = APPEND(msm_ring, bos); in append_bo()
205 msm_ring->submit.bos[idx].flags = 0; in append_bo()
206 msm_ring->submit.bos[idx].handle = bo->handle; in append_bo()
207 msm_ring->submit.bos[idx].presumed = to_msm_bo(bo)->presumed; in append_bo()
209 msm_ring->bos[idx] = fd_bo_ref(bo); in append_bo()
242 msm_ring->submit.bos[idx].flags |= MSM_SUBMIT_BO_READ; in bo2idx()
244 msm_ring->submit.bos[idx].flags |= MSM_SUBMIT_BO_WRITE; in bo2idx()
[all …]
/external/ksoap2/ksoap2-j2se/src/main/java/org/ksoap2/transport/
DHttpTransportSE.java312 OutputStream bos; in readDebug() local
314 bos = new FileOutputStream(outputFile); in readDebug()
317 bos = new ByteArrayOutputStream((contentLength > 0) ? contentLength : 256 * 1024); in readDebug()
327 bos.write(buf, 0, rd); in readDebug()
330 bos.flush(); in readDebug()
331 if (bos instanceof ByteArrayOutputStream) { in readDebug()
332 buf = ((ByteArrayOutputStream) bos).toByteArray(); in readDebug()
334 bos = null; in readDebug()
/external/droiddriver/src/io/appium/droiddriver/base/
DBaseUiDevice.java96 BufferedOutputStream bos = null; in takeScreenshot() local
98 bos = FileUtils.open(path); in takeScreenshot()
99 screenshot.compress(format, quality, bos); in takeScreenshot()
105 if (bos != null) { in takeScreenshot()
107 bos.close(); in takeScreenshot()
/external/caliper/examples/src/main/java/examples/
DCompressionSizeBenchmark.java73 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in compress() local
77 bos.write(buf, 0, count); in compress()
80 bos.close(); in compress()
83 return bos.toByteArray(); in compress()
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/compressors/deflate/
DDeflateCompressorOutputStreamTest.java31 try (final ByteArrayOutputStream bos = new ByteArrayOutputStream(); in canReadASingleByteFlushAndFinish() argument
32 final DeflateCompressorOutputStream cos = new DeflateCompressorOutputStream(bos)) { in canReadASingleByteFlushAndFinish()
36 Assert.assertTrue(bos.toByteArray().length > 0); in canReadASingleByteFlushAndFinish()
/external/ksoap2/kobjects/org/ksoap2/kobjects/mime/
DDecoder.java162 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in readContent() local
163 readContent(bos); in readContent()
165 ? new String(bos.toByteArray()) in readContent()
166 : new String(bos.toByteArray(), characterEncoding); in readContent()
183 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in readContent() local
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DCompositeReadableBufferTest.java140 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in readStreamShouldSucceed() local
143 composite.readBytes(bos, 1); in readStreamShouldSucceed()
147 composite.readBytes(bos, 5); in readStreamShouldSucceed()
151 composite.readBytes(bos, remaining); in readStreamShouldSucceed()
153 assertEquals(EXPECTED_VALUE, new String(bos.toByteArray(), UTF_8)); in readStreamShouldSucceed()
/external/mesa3d/src/amd/vulkan/winsys/amdgpu/
Dradv_amdgpu_bo.c111 bo->bos = realloc(bo->bos, new_count * sizeof(struct radv_amdgpu_winsys_bo *)); in radv_amdgpu_winsys_rebuild_bo_list()
118 bo->bos[temp_bo_count++] = bo->ranges[i].bo; in radv_amdgpu_winsys_rebuild_bo_list()
120 qsort(bo->bos, temp_bo_count, sizeof(struct radv_amdgpu_winsys_bo *), &bo_comparator); in radv_amdgpu_winsys_rebuild_bo_list()
124 if (bo->bos[i] != bo->bos[i - 1]) in radv_amdgpu_winsys_rebuild_bo_list()
125 bo->bos[final_bo_count++] = bo->bos[i]; in radv_amdgpu_winsys_rebuild_bo_list()
258 free(bo->bos); in radv_amdgpu_winsys_bo_destroy()
/external/ksoap2/ksoap2-base/src/main/java/org/ksoap2/serialization/
DSppPropertyInfo.java246 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in clone() local
247 ObjectOutputStream out = new ObjectOutputStream(bos); in clone()
255 new ByteArrayInputStream(bos.toByteArray())); in clone()
DPropertyInfo.java246 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in clone() local
247 ObjectOutputStream out = new ObjectOutputStream(bos); in clone()
255 new ByteArrayInputStream(bos.toByteArray())); in clone()
/external/apache-harmony/support/src/test/java/tests/util/
DSerializationTester.java69 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in getDeserilizedObject() local
70 ObjectOutputStream oos = new ObjectOutputStream(bos); in getDeserilizedObject()
74 ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); in getDeserilizedObject()
/external/ksoap2/kobjects/org/ksoap2/kobjects/base64/
DBase64.java120 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in decode() local
122 decode(s, bos); in decode()
126 return bos.toByteArray(); in decode()
/external/mesa3d/src/gallium/winsys/i915/drm/
Di915_drm_batchbuffer.c80 drm_intel_bo *bos[num_of_buffers + 1]; in i915_drm_batchbuffer_validate_buffers() local
83 bos[0] = drm_batch->bo; in i915_drm_batchbuffer_validate_buffers()
85 bos[i+1] = intel_bo(buffer[i]); in i915_drm_batchbuffer_validate_buffers()
87 ret = drm_intel_bufmgr_check_aperture_space(bos, num_of_buffers); in i915_drm_batchbuffer_validate_buffers()
/external/droiddriver/src/io/appium/droiddriver/finders/
DByXPath.java199 BufferedOutputStream bos = null; in dumpDom() local
201 bos = FileUtils.open(path); in dumpDom()
208 transformer.transform(new DOMSource(domNode), new StreamResult(bos)); in dumpDom()
216 if (bos != null) { in dumpDom()
218 bos.close(); in dumpDom()
/external/robolectric-shadows/utils/src/main/java/org/robolectric/util/
DUtil.java40 try (ByteArrayOutputStream bos = new ByteArrayOutputStream(is.available())) { in readBytes() argument
41 copy(is, bos); in readBytes()
42 return bos.toByteArray(); in readBytes()

12345