Home
last modified time | relevance | path

Searched refs:MemoryStream (Results 1 – 25 of 53) sorted by relevance

123

/external/libbrillo/brillo/streams/
Dmemory_stream.cc16 MemoryStream::MemoryStream( in MemoryStream() function in brillo::MemoryStream
21 StreamPtr MemoryStream::OpenRef(const void* buffer, in OpenRef()
29 StreamPtr MemoryStream::OpenCopyOf(const void* buffer, in OpenCopyOf()
38 StreamPtr MemoryStream::OpenRef(const std::string& buffer, ErrorPtr* error) { in OpenRef()
44 StreamPtr MemoryStream::OpenCopyOf(std::string buffer, ErrorPtr* error) { in OpenCopyOf()
50 StreamPtr MemoryStream::OpenRef(const char* buffer, ErrorPtr* error) { in OpenRef()
54 StreamPtr MemoryStream::OpenCopyOf(const char* buffer, ErrorPtr* error) { in OpenCopyOf()
58 StreamPtr MemoryStream::Create(size_t reserve_size, ErrorPtr* error) { in Create()
64 StreamPtr MemoryStream::CreateRef(std::string* buffer, ErrorPtr* error) { in CreateRef()
70 StreamPtr MemoryStream::CreateRefForAppend(std::string* buffer, in CreateRefForAppend()
[all …]
Dmemory_stream_test.cc58 stream_.reset(new MemoryStream{std::move(container), 0}); in SetUp()
73 std::unique_ptr<MemoryStream> stream_;
211 TEST(MemoryStream, OpenBinary) { in TEST() argument
213 StreamPtr stream = MemoryStream::OpenRef(buffer, sizeof(buffer), nullptr); in TEST()
225 TEST(MemoryStream, OpenBinaryCopy) { in TEST() argument
227 StreamPtr stream = MemoryStream::OpenCopyOf(buffer, sizeof(buffer), nullptr); in TEST()
239 TEST(MemoryStream, OpenString) { in TEST() argument
241 StreamPtr stream = MemoryStream::OpenRef(str, nullptr); in TEST()
251 TEST(MemoryStream, OpenStringCopy) { in TEST() argument
253 StreamPtr stream = MemoryStream::OpenCopyOf(str, nullptr); in TEST()
[all …]
Dmemory_stream.h53 class BRILLO_EXPORT MemoryStream : public Stream {
196 MemoryStream(
209 DISALLOW_COPY_AND_ASSIGN(MemoryStream);
/external/webrtc/rtc_base/
Dmemory_stream.cc22 StreamState MemoryStream::GetState() const { in GetState()
26 StreamResult MemoryStream::Read(void* buffer, in Read()
46 StreamResult MemoryStream::Write(const void* buffer, in Write()
79 void MemoryStream::Close() { in Close()
83 bool MemoryStream::SetPosition(size_t position) { in SetPosition()
90 bool MemoryStream::GetPosition(size_t* position) const { in GetPosition()
96 void MemoryStream::Rewind() { in Rewind()
100 bool MemoryStream::GetSize(size_t* size) const { in GetSize()
106 bool MemoryStream::ReserveSize(size_t size) { in ReserveSize()
112 MemoryStream::MemoryStream() {} in MemoryStream() function in rtc::MemoryStream
[all …]
Dmemory_stream.h22 class MemoryStream final : public StreamInterface {
24 MemoryStream();
25 ~MemoryStream() override;
/external/puffin/src/
Dmemory_stream.cc18 UniqueStreamPtr MemoryStream::CreateForRead(const Buffer& memory) { in CreateForRead()
19 return UniqueStreamPtr(new MemoryStream(&memory, nullptr)); in CreateForRead()
22 UniqueStreamPtr MemoryStream::CreateForWrite(Buffer* memory) { in CreateForWrite()
23 return UniqueStreamPtr(new MemoryStream(nullptr, memory)); in CreateForWrite()
26 MemoryStream::MemoryStream(const Buffer* read_memory, Buffer* write_memory) in MemoryStream() function in puffin::MemoryStream
32 bool MemoryStream::GetSize(uint64_t* size) const { in GetSize()
38 bool MemoryStream::GetOffset(uint64_t* offset) const { in GetOffset()
43 bool MemoryStream::Seek(uint64_t offset) { in Seek()
52 bool MemoryStream::Read(void* buffer, size_t length) { in Read()
61 bool MemoryStream::Write(const void* buffer, size_t length) { in Write()
[all …]
Dmemory_stream.h17 class MemoryStream : public StreamInterface {
19 ~MemoryStream() override = default;
38 MemoryStream(const Buffer* read_memory, Buffer* write_memory);
52 DISALLOW_COPY_AND_ASSIGN(MemoryStream);
Dfuzzer_puffpatch.cc17 using puffin::MemoryStream;
81 auto src = MemoryStream::CreateForRead(src_buffer); in FuzzPuffPatch()
82 auto dst = MemoryStream::CreateForWrite(&dst_buffer); in FuzzPuffPatch()
Dstream_unittest.cc163 auto read_stream = MemoryStream::CreateForRead(buf); in TEST_F()
167 auto write_stream = MemoryStream::CreateForWrite(&buf); in TEST_F()
200 MemoryStream::CreateForRead(kDeflatesSample1), puffer, in TEST_F()
209 MemoryStream::CreateForRead(kDeflatesSample1), puffer, in TEST_F()
219 MemoryStream::CreateForWrite(&buf), huffer, kPuffsSample1.size(), in TEST_F()
258 ExtentStream::CreateForRead(MemoryStream::CreateForRead(buf), extents); in TEST_F()
270 MemoryStream::CreateForWrite(&buf2), extents); in TEST_F()
/external/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
DCodedOutputStreamTest.cs51 MemoryStream rawOutput = new MemoryStream(); in AssertWriteVarint()
61 MemoryStream rawOutput = new MemoryStream(); in AssertWriteVarint()
77 MemoryStream rawOutput = new MemoryStream(); in AssertWriteVarint()
86 MemoryStream rawOutput = new MemoryStream(); in AssertWriteVarint()
136 MemoryStream rawOutput = new MemoryStream(); in AssertWriteLittleEndian32()
145 rawOutput = new MemoryStream(); in AssertWriteLittleEndian32()
159 MemoryStream rawOutput = new MemoryStream(); in AssertWriteLittleEndian64()
168 rawOutput = new MemoryStream(); in AssertWriteLittleEndian64()
203 MemoryStream rawOutput = new MemoryStream(); in WriteWholeMessage_VaryingBlockSizes()
295 MemoryStream ms = new MemoryStream(child); in TestCodedInputOutputPosition()
[all …]
DCodedInputStreamTest.cs83 MemoryStream memoryStream = new MemoryStream(); in AssertReadVarint()
107 …ws<InvalidProtocolBufferException>(() => CodedInputStream.ReadRawVarint32(new MemoryStream(data))); in AssertReadVarintFailure()
271 MemoryStream ms = new MemoryStream(); in ReadMaliciouslyLargeBlob()
323 …CodedInputStream input = CodedInputStream.CreateWithLimits(new MemoryStream(atRecursiveLimit.ToByt… in MaliciousRecursion()
332MemoryStream ms = new MemoryStream(SampleMessages.CreateFullTestAllTypes().ToByteArray()); in SizeLimit()
345 MemoryStream ms = new MemoryStream(); in ReadInvalidUtf8()
367 private sealed class SmallBlockInputStream : MemoryStream
396 using (var ms = new MemoryStream()) in TestSlowPathAvoidance()
436 var stream = new MemoryStream(); in SkipGroup()
480 var stream = new MemoryStream(); in SkipGroup_WrongEndGroupTag()
[all …]
DFieldCodecTest.cs125 var stream = new MemoryStream(); in TestRoundTripRaw()
137 var stream = new MemoryStream(); in TestRoundTripWithTag()
150 var stream = new MemoryStream(); in TestCalculateSizeWithTag()
160 var stream = new MemoryStream(); in TestDefaultValue()
/external/protobuf/csharp/src/Google.Protobuf.Test/
DCodedOutputStreamTest.cs51 MemoryStream rawOutput = new MemoryStream(); in AssertWriteVarint()
61 MemoryStream rawOutput = new MemoryStream(); in AssertWriteVarint()
77 MemoryStream rawOutput = new MemoryStream(); in AssertWriteVarint()
86 MemoryStream rawOutput = new MemoryStream(); in AssertWriteVarint()
136 MemoryStream rawOutput = new MemoryStream(); in AssertWriteLittleEndian32()
145 rawOutput = new MemoryStream(); in AssertWriteLittleEndian32()
159 MemoryStream rawOutput = new MemoryStream(); in AssertWriteLittleEndian64()
168 rawOutput = new MemoryStream(); in AssertWriteLittleEndian64()
203 MemoryStream rawOutput = new MemoryStream(); in WriteWholeMessage_VaryingBlockSizes()
295 MemoryStream ms = new MemoryStream(child); in TestCodedInputOutputPosition()
[all …]
DCodedInputStreamTest.cs83 MemoryStream memoryStream = new MemoryStream(); in AssertReadVarint()
107 …ws<InvalidProtocolBufferException>(() => CodedInputStream.ReadRawVarint32(new MemoryStream(data))); in AssertReadVarintFailure()
271 MemoryStream ms = new MemoryStream(); in ReadMaliciouslyLargeBlob()
337 …CodedInputStream input = CodedInputStream.CreateWithLimits(new MemoryStream(atRecursiveLimit.ToByt… in MaliciousRecursion()
346MemoryStream ms = new MemoryStream(SampleMessages.CreateFullTestAllTypes().ToByteArray()); in SizeLimit()
359 MemoryStream ms = new MemoryStream(); in ReadInvalidUtf8()
379 MemoryStream ms = new MemoryStream(); in ReadNegativeSizedStringThrowsInvalidProtocolBufferException()
397 MemoryStream ms = new MemoryStream(); in ReadNegativeSizedBytesThrowsInvalidProtocolBufferException()
417 private sealed class SmallBlockInputStream : MemoryStream
446 using (var ms = new MemoryStream()) in TestSlowPathAvoidance()
[all …]
DUnknownFieldSetTest.cs170 assertFull(retainingParser1.ParseFrom(new MemoryStream(data))); in TestDiscardUnknownFields()
171 assertFull(retainingParser2.ParseFrom(new MemoryStream(data))); in TestDiscardUnknownFields()
172 assertEmpty(discardingParser1.ParseFrom(new MemoryStream(data))); in TestDiscardUnknownFields()
173 assertEmpty(discardingParser2.ParseFrom(new MemoryStream(data))); in TestDiscardUnknownFields()
179 MemoryStream ms = new MemoryStream(); in TestReadInvalidWireTypeThrowsInvalidProtocolBufferException()
DFieldCodecTest.cs125 var stream = new MemoryStream(); in TestRoundTripRaw()
137 var stream = new MemoryStream(); in TestRoundTripWithTag()
150 var stream = new MemoryStream(); in TestCalculateSizeWithTag()
160 var stream = new MemoryStream(); in TestDefaultValue()
DByteStringTest.cs178 var stream = new MemoryStream(new byte[] { 1, 2, 3, 4, 5 }); in FromStream_Seekable()
189 var stream = new MemoryStream(new byte[] { 1, 2, 3, 4, 5 }); in FromStream_NotSeekable()
203 var stream = new MemoryStream(new byte[] { 1, 2, 3, 4, 5 }); in FromStreamAsync_Seekable()
214 var stream = new MemoryStream(new byte[] { 1, 2, 3, 4, 5 }); in FromStreamAsync_NotSeekable()
/external/antlr/runtime/CSharp2/Sources/Antlr3.Runtime.Tests/
DANTLRxxxxStreamFixture.cs42 using MemoryStream = System.IO.MemoryStream; typedef
68 MemoryStream grammarStream = new MemoryStream(grammarStrBuffer); in TestANTLRInputStreamConstructorDoesNotHang()
76 MemoryStream grammarStream = new MemoryStream(new byte[] { }); in TestSizeOnEmptyANTLRInputStream()
87 MemoryStream grammarStream = new MemoryStream(grammarStrBuffer); in TestSizeOnANTLRInputStream()
98 MemoryStream grammarStream = new MemoryStream(grammarStrBuffer); in TestConsumeAndIndexOnANTLRInputStream()
121 MemoryStream grammarStream = new MemoryStream(grammarStrBuffer); in TestConsumeAllCharactersInAnANTLRInputStream()
137 MemoryStream grammarStream = new MemoryStream(buffer); in TestConsumeOnANTLRInputStream()
200 MemoryStream grammarStream = new MemoryStream(buffer); in TestResetOnANTLRInputStream()
238 MemoryStream grammarStream = new MemoryStream(buffer); in TestSubstringOnANTLRInputStream()
258 MemoryStream grammarStream = new MemoryStream(buffer); in TestSeekOnANTLRInputStream()
/external/brotli/csharp/org/brotli/dec/
DDecodeTest.cs19 System.IO.MemoryStream input = new System.IO.MemoryStream(data); in Decompress()
20 System.IO.MemoryStream output = new System.IO.MemoryStream(); in Decompress()
56 System.IO.MemoryStream input = new System.IO.MemoryStream(data); in DecompressWithDictionary()
57 System.IO.MemoryStream output = new System.IO.MemoryStream(); in DecompressWithDictionary()
DSynthTest.cs19 System.IO.MemoryStream input = new System.IO.MemoryStream(data); in Decompress()
20 System.IO.MemoryStream output = new System.IO.MemoryStream(); in Decompress()
/external/protobuf/csharp/src/Google.Protobuf.Test/Compatibility/
DStreamExtensionsTest.cs46 var memoryStream = new MemoryStream(); in CopyToNullArgument()
54 Stream source = new MemoryStream(bytesToStream); in CopyToTest()
55 Stream destination = new MemoryStream((int)source.Length); in CopyToTest()
/external/lzma/CS/7zip/Compress/LzmaAlone/
DLzmaBench.cs269 System.IO.MemoryStream propStream = new System.IO.MemoryStream(); in LzmaBenchmark()
289 MemoryStream inStream = new MemoryStream(rg.Buffer, 0, (int)rg.BufferSize); in LzmaBenchmark()
290 MemoryStream compressedStream = new MemoryStream((int)kCompressedBufferSize); in LzmaBenchmark()
/external/protobuf/csharp/src/AddressBook/
DSampleUsage.cs51 using (MemoryStream stream = new MemoryStream()) in Main()
/external/brotli/csharp/
Dsharpen.cfg11 -typeMapping java.io.ByteArrayInputStream System.IO.MemoryStream
12 -typeMapping java.io.ByteArrayOutputStream System.IO.MemoryStream
/external/libbrillo/brillo/http/
Dhttp_form_data.cc89 streams->push_back(MemoryStream::OpenCopyOf(data_, nullptr)); in ExtractDataStreams()
132 streams->push_back(MemoryStream::OpenCopyOf(data, nullptr)); in ExtractDataStreams()
136 streams->push_back(MemoryStream::OpenRef("\r\n", nullptr)); in ExtractDataStreams()
140 streams->push_back(MemoryStream::OpenCopyOf(data, nullptr)); in ExtractDataStreams()

123