MCPcopy Create free account
hub / github.com/csyonghe/Spire / StreamWriter

Method StreamWriter

Source/CoreLib/TextIO.cpp:123–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 const unsigned short Utf16ReversedHeader = 0xFFFE;
122
123 StreamWriter::StreamWriter(const String & path, Encoding * encoding)
124 {
125 this->stream = new FileStream(path, FileMode::Create);
126 this->encoding = encoding;
127 if (encoding == Encoding::UTF16)
128 {
129 this->stream->Write(&Utf16Header, 2);
130 }
131 else if (encoding == Encoding::UTF16Reversed)
132 {
133 this->stream->Write(&Utf16ReversedHeader, 2);
134 }
135 }
136 StreamWriter::StreamWriter(RefPtr<Stream> stream, Encoding * encoding)
137 {
138 this->stream = stream;

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected