Home
last modified time | relevance | path

Searched refs:memoryStream (Results 1 – 14 of 14) sorted by relevance

/third_party/protobuf/csharp/src/Google.Protobuf/
DByteString.cs182 var memoryStream = new MemoryStream(capacity); in FromStream()
183 stream.CopyTo(memoryStream); in FromStream()
185 byte[] bytes = memoryStream.ToArray(); in FromStream()
188 …byte[] bytes = memoryStream.Length == memoryStream.Capacity ? memoryStream.GetBuffer() : memoryStr… in FromStream()
206 var memoryStream = new MemoryStream(capacity); in FromStreamAsync()
209 await stream.CopyToAsync(memoryStream, 81920, cancellationToken); in FromStreamAsync()
211 byte[] bytes = memoryStream.ToArray(); in FromStreamAsync()
214 …byte[] bytes = memoryStream.Length == memoryStream.Capacity ? memoryStream.GetBuffer() : memoryStr… in FromStreamAsync()
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
DCodedOutputStreamTest.cs394 var memoryStream = new MemoryStream(); in Dispose_DisposesUnderlyingStream()
395 Assert.IsTrue(memoryStream.CanWrite); in Dispose_DisposesUnderlyingStream()
396 using (var cos = new CodedOutputStream(memoryStream)) in Dispose_DisposesUnderlyingStream()
399 Assert.AreEqual(0, memoryStream.Position); // Not flushed yet in Dispose_DisposesUnderlyingStream()
401 …Assert.AreEqual(1, memoryStream.ToArray().Length); // Flushed data from CodedOutputStream to Memor… in Dispose_DisposesUnderlyingStream()
402 Assert.IsFalse(memoryStream.CanWrite); // Disposed in Dispose_DisposesUnderlyingStream()
408 var memoryStream = new MemoryStream(); in Dispose_WithLeaveOpen()
409 Assert.IsTrue(memoryStream.CanWrite); in Dispose_WithLeaveOpen()
410 using (var cos = new CodedOutputStream(memoryStream, true)) in Dispose_WithLeaveOpen()
413 Assert.AreEqual(0, memoryStream.Position); // Not flushed yet in Dispose_WithLeaveOpen()
[all …]
DGeneratedMessageTest.cs257 var memoryStream = new MemoryStream(); in MapWithOnlyValue()
258 var output = new CodedOutputStream(memoryStream); in MapWithOnlyValue()
267 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapWithOnlyValue()
275 var memoryStream = new MemoryStream(); in MapWithOnlyKey_PrimitiveValue()
276 var output = new CodedOutputStream(memoryStream); in MapWithOnlyKey_PrimitiveValue()
284 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapWithOnlyKey_PrimitiveValue()
292 var memoryStream = new MemoryStream(); in MapWithOnlyKey_MessageValue()
293 var output = new CodedOutputStream(memoryStream); in MapWithOnlyKey_MessageValue()
301 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapWithOnlyKey_MessageValue()
309 var memoryStream = new MemoryStream(); in MapIgnoresExtraFieldsWithinEntryMessages()
[all …]
DCodedInputStreamTest.cs83 MemoryStream memoryStream = new MemoryStream(); in AssertReadVarint()
84 memoryStream.Write(data, 0, data.Length); in AssertReadVarint()
85 memoryStream.WriteByte(0); in AssertReadVarint()
86 memoryStream.Position = 0; in AssertReadVarint()
87 Assert.AreEqual((uint) value, CodedInputStream.ReadRawVarint32(memoryStream)); in AssertReadVarint()
88 Assert.AreEqual(data.Length, memoryStream.Position); in AssertReadVarint()
579 var memoryStream = new MemoryStream(); in Dispose_DisposesUnderlyingStream()
580 Assert.IsTrue(memoryStream.CanRead); in Dispose_DisposesUnderlyingStream()
581 using (var cis = new CodedInputStream(memoryStream)) in Dispose_DisposesUnderlyingStream()
584 Assert.IsFalse(memoryStream.CanRead); // Disposed in Dispose_DisposesUnderlyingStream()
[all …]
/third_party/protobuf/csharp/src/Google.Protobuf.Test/
DGeneratedMessageTest.cs267 var memoryStream = new MemoryStream(); in MapWithOnlyValue()
268 var output = new CodedOutputStream(memoryStream); in MapWithOnlyValue()
279 memoryStream.ToArray(), in MapWithOnlyValue()
290 var memoryStream = new MemoryStream(); in MapWithOnlyKey_PrimitiveValue()
291 var output = new CodedOutputStream(memoryStream); in MapWithOnlyKey_PrimitiveValue()
301 memoryStream.ToArray(), in MapWithOnlyKey_PrimitiveValue()
312 var memoryStream = new MemoryStream(); in MapWithOnlyKey_MessageValue()
313 var output = new CodedOutputStream(memoryStream); in MapWithOnlyKey_MessageValue()
323 memoryStream.ToArray(), in MapWithOnlyKey_MessageValue()
334 var memoryStream = new MemoryStream(); in MapIgnoresExtraFieldsWithinEntryMessages()
[all …]
DCodedOutputStreamTest.cs488 var memoryStream = new MemoryStream(); in Dispose_DisposesUnderlyingStream()
489 Assert.IsTrue(memoryStream.CanWrite); in Dispose_DisposesUnderlyingStream()
490 using (var cos = new CodedOutputStream(memoryStream)) in Dispose_DisposesUnderlyingStream()
493 Assert.AreEqual(0, memoryStream.Position); // Not flushed yet in Dispose_DisposesUnderlyingStream()
495 …Assert.AreEqual(1, memoryStream.ToArray().Length); // Flushed data from CodedOutputStream to Memor… in Dispose_DisposesUnderlyingStream()
496 Assert.IsFalse(memoryStream.CanWrite); // Disposed in Dispose_DisposesUnderlyingStream()
502 var memoryStream = new MemoryStream(); in Dispose_WithLeaveOpen()
503 Assert.IsTrue(memoryStream.CanWrite); in Dispose_WithLeaveOpen()
504 using (var cos = new CodedOutputStream(memoryStream, true)) in Dispose_WithLeaveOpen()
507 Assert.AreEqual(0, memoryStream.Position); // Not flushed yet in Dispose_WithLeaveOpen()
[all …]
DCodedInputStreamTest.cs106 MemoryStream memoryStream = new MemoryStream(); in AssertReadVarint()
107 memoryStream.Write(data, 0, data.Length); in AssertReadVarint()
108 memoryStream.WriteByte(0); in AssertReadVarint()
109 memoryStream.Position = 0; in AssertReadVarint()
110 Assert.AreEqual((uint) value, CodedInputStream.ReadRawVarint32(memoryStream)); in AssertReadVarint()
111 Assert.AreEqual(data.Length, memoryStream.Position); in AssertReadVarint()
852 var memoryStream = new MemoryStream(); in Dispose_DisposesUnderlyingStream()
853 Assert.IsTrue(memoryStream.CanRead); in Dispose_DisposesUnderlyingStream()
854 using (var cis = new CodedInputStream(memoryStream)) in Dispose_DisposesUnderlyingStream()
857 Assert.IsFalse(memoryStream.CanRead); // Disposed in Dispose_DisposesUnderlyingStream()
[all …]
/third_party/protobuf/csharp/src/Google.Protobuf.Test/Compatibility/
DStreamExtensionsTest.cs46 var memoryStream = new MemoryStream(); in CopyToNullArgument()
47 Assert.Throws<ArgumentNullException>(() => memoryStream.CopyTo(null)); in CopyToNullArgument()
/third_party/protobuf/csharp/src/Google.Protobuf.Test/Collections/
DMapFieldTest.cs594 var memoryStream = new MemoryStream(); in AddEntriesFrom_CodedInputStream()
595 var output = new CodedOutputStream(memoryStream); in AddEntriesFrom_CodedInputStream()
605 var input = new CodedInputStream(memoryStream.ToArray()); in AddEntriesFrom_CodedInputStream()
/third_party/skia/src/ports/skia_ohos/
DSkFontMgr_ohos.cpp300 std::unique_ptr<SkMemoryStream> memoryStream = std::make_unique<SkMemoryStream>(data); in onMakeFromData() local
303 return this->makeTypeface(std::move(memoryStream), args, nullptr); in onMakeFromData()
/third_party/flutter/skia/src/ports/skia_ohos/
DSkFontMgr_ohos.cpp300 std::unique_ptr<SkMemoryStream> memoryStream = std::make_unique<SkMemoryStream>(data); in onMakeFromData() local
303 return this->makeTypeface(std::move(memoryStream), args, nullptr); in onMakeFromData()
/third_party/skia/src/codec/
DSkRawCodec.cpp656 auto memoryStream = rawStream->transferBuffer(imageData.preview.offset, in MakeFromStream() local
658 if (!memoryStream) { in MakeFromStream()
662 return SkJpegCodec::MakeFromStream(std::move(memoryStream), result, in MakeFromStream()
/third_party/flutter/skia/src/codec/
DSkRawCodec.cpp656 auto memoryStream = rawStream->transferBuffer(imageData.preview.offset, in MakeFromStream() local
658 if (!memoryStream) { in MakeFromStream()
662 return SkJpegCodec::MakeFromStream(std::move(memoryStream), result, in MakeFromStream()
/third_party/chromium/patch/
D0003-ohos-1115.patch83057 + std::unique_ptr<SkMemoryStream> memoryStream = std::make_unique<SkMemoryStream>(data);
83060 + return this->makeTypeface(std::move(memoryStream), args, nullptr);