-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIDataWriter.cs
129 lines (108 loc) · 3.28 KB
/
IDataWriter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public interface IDataWriter
{
byte[] Data
{
get;
}
/// <summary>
/// Write a Short into the buffer
/// </summary>
/// <returns></returns>
void WriteShort(short @short);
/// <summary>
/// Write a int into the buffer
/// </summary>
/// <returns></returns>
void WriteInt(int @int);
/// <summary>
/// Write a long into the buffer
/// </summary>
/// <returns></returns>
void WriteLong(Int64 @long);
/// <summary>
/// Write a UShort into the buffer
/// </summary>
/// <returns></returns>
void WriteUShort(ushort @ushort);
/// <summary>
/// Write a int into the buffer
/// </summary>
/// <returns></returns>
void WriteUInt(UInt32 @uint);
/// <summary>
/// Write a long into the buffer
/// </summary>
/// <returns></returns>
void WriteULong(UInt64 @ulong);
/// <summary>
/// Write a byte into the buffer
/// </summary>
/// <returns></returns>
void WriteByte(byte @byte);
void WriteSByte(sbyte @byte);
/// <summary>
/// Write a Float into the buffer
/// </summary>
/// <returns></returns>
void WriteFloat(float @float);
/// <summary>
/// Write a Boolean into the buffer
/// </summary>
/// <returns></returns>
void WriteBoolean(Boolean @bool);
/// <summary>
/// Write a Char into the buffer
/// </summary>
/// <returns></returns>
void WriteChar(Char @char);
/// <summary>
/// Write a Double into the buffer
/// </summary>
void WriteDouble(Double @double);
/// <summary>
/// Write a Single into the buffer
/// </summary>
/// <returns></returns>
void WriteSingle(Single @single);
/// <summary>
/// Write a string into the buffer
/// </summary>
/// <returns></returns>
void WriteUTF(string str);
/// <summary>
/// Write a string into the buffer
/// </summary>
/// <returns></returns>
void WriteUTFBytes(string str);
/// <summary>
/// Write bytes array into the buffer
/// </summary>
/// <returns></returns>
void WriteBytes(byte[] data);
/// <summary>
/// Write bytes array into the buffer
/// </summary>
/// <returns></returns>
void WriteBytes(byte[] data, uint offset, uint length);
/// <summary>
/// Write a int array into the buffer
/// </summary>
/// <returns></returns>
void WriteVarInt(int @int);
/// <summary>
/// Write a int array into the buffer
/// </summary>
/// <returns></returns>
void WriteVarShort(int @int);
/// <summary>
/// Write a double array into the buffer
/// </summary>
/// <returns></returns>
void WriteVarLong(double @double);
void Clear();
}