Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Read() [1/2]

override int System.Xml.EncodingStreamWrapper.Read ( byte[] buffer,
int offset,
int count )
inline

Definition at line 613 of file EncodingStreamWrapper.cs.

614 {
615 try
616 {
617 if (_byteCount == 0)
618 {
619 if (_encodingCode == SupportedEncoding.UTF8)
620 {
621 return _stream.Read(buffer, offset, count);
622 }
623 _byteOffset = 0;
624 _byteCount = _stream.Read(_bytes, _byteCount, (_chars.Length - 1) * 2);
625 if (_byteCount == 0)
626 {
627 return 0;
628 }
631 _byteCount = Encoding.UTF8.GetBytes(_chars, 0, chars, _bytes, 0);
632 }
633 if (_byteCount < count)
634 {
636 }
639 _byteCount -= count;
640 return count;
641 }
643 {
645 }
646 }
int Read(byte[] buffer, int offset, int count)
static string XmlInvalidBytes
Definition SR.cs:416
Definition SR.cs:7
static Encoding UTF8
Definition Encoding.cs:526
virtual char[] GetChars(byte[] bytes)
Definition Encoding.cs:921

References System.Xml.EncodingStreamWrapper._byteCount, System.Xml.EncodingStreamWrapper._byteOffset, System.Xml.EncodingStreamWrapper._bytes, System.Xml.EncodingStreamWrapper._chars, System.Xml.EncodingStreamWrapper._encoding, System.Xml.EncodingStreamWrapper._encodingCode, System.Xml.EncodingStreamWrapper._stream, System.Buffer.BlockCopy(), System.buffer, System.chars, System.Xml.EncodingStreamWrapper.CleanupCharBreak(), System.count, System.Xml.Dictionary, System.Text.Encoding.GetChars(), System.offset, System.IO.Stream.Read(), System.Text.Encoding.UTF8, System.Xml.XmlException, and System.SR.XmlInvalidBytes.