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

◆ EncodeBytes()

int System.Net.Mime.ByteEncoder.EncodeBytes ( byte[] buffer,
int offset,
int count,
bool dontDeferFinalBytes,
bool shouldAppendSpaceToCRLF )
inlineinherited

Implements System.Net.Mime.IByteEncoder.

Definition at line 16 of file ByteEncoder.cs.

17 {
18 WriteState.AppendHeader();
19 bool hasSpecialEncodingForCRLF = HasSpecialEncodingForCRLF;
20 int i;
21 for (i = offset; i < count + offset; i++)
22 {
23 if (LineBreakNeeded(buffer[i]))
24 {
26 WriteState.AppendCRLF(shouldAppendSpaceToCRLF);
27 }
28 if (hasSpecialEncodingForCRLF && IsCRLF(buffer, i, count + offset))
29 {
31 i++;
32 }
33 else
34 {
36 }
37 }
38 if (dontDeferFinalBytes)
39 {
41 }
42 WriteState.AppendFooter();
43 return i - offset;
44 }
void ApppendEncodedByte(byte b)
bool IsCRLF(byte[] bytes, int count)

References System.Net.Mime.ByteEncoder.AppendEncodedCRLF(), System.Net.Mime.ByteEncoder.AppendPadding(), System.Net.Mime.ByteEncoder.ApppendEncodedByte(), System.buffer, System.count, System.Net.Mime.ByteEncoder.HasSpecialEncodingForCRLF, System.Net.Mime.ByteEncoder.IsCRLF(), System.Net.Mime.ByteEncoder.LineBreakNeeded(), and System.offset.

Referenced by System.Net.Mime.ByteEncoder.EncodeString().