Exemple #1
0
 /// <summary>
 /// Sets the writer's endian to the one specified.
 /// <param name="endian">Endian to change to.</param>
 /// </summary>
 public void SetEndian(DhEndian endian)
 {
     Endian = endian;
 }
Exemple #2
0
 /// <summary>
 /// Init Binary Writer (UTF-8 Encoding)
 /// </summary>
 /// <param name="stream">The stream to write data to.</param>
 public DhBinaryWriter(Stream stream, DhEndian endian)
 {
     Writer   = new BinaryWriter(stream, Encoding.UTF8);
     Endian   = endian;
     Encoding = Encoding.UTF8;
 }
Exemple #3
0
 /// <summary>
 /// Init Binary Writer (Custom Encoding)
 /// </summary>
 /// <param name="stream">The stream to write data to.</param>
 public DhBinaryWriter(Stream stream, DhEndian endian, Encoding encoding)
 {
     Writer   = new BinaryWriter(stream, encoding);
     Endian   = endian;
     Encoding = encoding;
 }
Exemple #4
0
 /// <summary>
 /// Init Binary Reader. (UTF-8 Encoding)
 /// </summary>
 /// <param name="data">The data to read from.</param>
 public DhBinaryReader(byte[] data, DhEndian endian)
 {
     Reader   = new BinaryReader(new MemoryStream(data), Encoding.UTF8);
     Endian   = endian;
     Encoding = Encoding.UTF8;
 }